//--------------------------------------------- // Create a udp socket for sending reRequests // udpRequestsocket_ = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); if ( udpRequestsocket_ == INVALID_SOCKET) { WSACleanup(); return 1; } int flag = 1; int result = setsockopt(udpRequestsocket_, /* socket affected */ IPPROTO_TCP, /* set option at TCP level */ TCP_NODELAY, /* name of option */ (char *)flag, /* the cast is historical cruft */ sizeof(int)); /* length of option value */ if (result) { sprintf_s(logBuf, sizeof(logBuf), "ERR: error:%d setting setsockopt for updRequestsocket_", WSAGetLastError()); MyLog(logBuf); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)