71 hints.ai_family = AF_INET;
72 hints.ai_socktype = SOCK_STREAM;
74 hints.ai_protocol = 0;
75 hints.ai_canonname = NULL;
78 if (0 == GETADDRINFO(buff, NULL, &hints, &result))
80 this->
sockaddr_ = *((sockaddr_in *)result->ai_addr);
84 this->
sockaddr_.sin_addr.s_addr = INET_ADDR(buff);
86 this->
sockaddr_.sin_port = HTONS(port_num);
95 LOG_WARN(
"Tried to connect when socket already in connected state");
134 sock_handle = SOCKET(AF_INET, SOCK_STREAM, 0);
142 int disableNodeDelay = 1;
144 if (
SOCKET_FAIL == SET_NO_DELAY(sock_handle, disableNodeDelay))
146 LOG_WARN(
"Failed to set no socket delay, sending data can be delayed by up to 250ms");