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));
Definition: tcp_client.h:47
void wait_for_data(uint64_t bytes, uint32_t timeout)
Definition: tcp_client.h:70
void send_data(char *data, int length)
void receive_data(char *data, int length)
tcp_client(std::string addr, int port)
int s
Definition: tcp_client.h:57
tcp_client()
Definition: tcp_client.h:59
uint64_t available_data()
struct sockaddr_in socketAddr
Definition: tcp_client.h:56