Web framework C++  2.0.0
Simple web framework on c++ designed to easily create web pages, etc
socket_windows_api.h
Go to the documentation of this file.
1 #pragma once
2 #if defined(_WIN32) || defined(_Win64)
3 
4 #include <string>
5 #include <winsock2.h>
6 #include "socket_api.h"
7 
11 class SocketWindowsAPI : public SocketAPI {
12  SOCKET serverSocket;
13  SOCKET clientSocket;
14 public:
18  ~SocketWindowsAPI() override;
19 
23  void init(std::string ip, int port, bool isIpv6) override;
24 
28  std::string getData() override;
29 
33  void receiveData(const std::string & data) override;
34 
38  std::string getIpFromDomain(std::string &domain, bool isHttps, bool *IPv6) override;
39 };
40 
41 #endif // defined(_WIN32) || defined(_Win64)
virtual std::string getData()=0
virtual void receiveData(const std::string &data)=0
virtual void init(std::string ip, int port, bool isIpv6)=0
virtual std::string getIpFromDomain(std::string &domain, bool isHttps, bool *IPv6)=0
interface for network realization
Definition: socket_api.h:6