34 # include <winsock2.h> 35 # include <Ws2tcpip.h> 37 # include <sys/socket.h> 38 # include <netinet/in.h> 42 #if defined(__GNUC__) || defined(__MINGW32__) 51 static std::atomic_bool initialized;
52 static std::atomic_uint sockCount;
53 void socket_initialize();
71 uint32_t checkTime = (int) time(NULL);
73 if (((
int) time(NULL)) - checkTime > timeout) {
77 std::this_thread::sleep_for(std::chrono::microseconds(10));
tcp_client()
Definition: tcp_client.h:59
void send_data(char *data, int length)
void receive_data(char *data, int length)
struct sockaddr_in socketAddr
Definition: tcp_client.h:56
uint64_t available_data()
void wait_for_data(uint64_t bytes, uint32_t timeout)
Definition: tcp_client.h:70
int s
Definition: tcp_client.h:57
Definition: tcp_client.h:47