rm [redundance

This commit is contained in:
yihaoDeng 2022-10-23 12:29:02 +08:00
parent 44e27f2906
commit b0edb7c017
1 changed files with 15 additions and 14 deletions

View File

@ -223,20 +223,6 @@ int32_t taosShutDownSocketServerRDWR(TdSocketServerPtr pSocketServer) {
#endif #endif
} }
void taosWinSocketInit() {
#ifdef WINDOWS
static char flag = 0;
if (flag == 0) {
WORD wVersionRequested;
WSADATA wsaData;
wVersionRequested = MAKEWORD(1, 1);
if (WSAStartup(wVersionRequested, &wsaData) == 0) {
flag = 1;
}
}
#else
#endif
}
int32_t taosSetNonblocking(TdSocketPtr pSocket, int32_t on) { int32_t taosSetNonblocking(TdSocketPtr pSocket, int32_t on) {
if (pSocket == NULL || pSocket->fd < 0) { if (pSocket == NULL || pSocket->fd < 0) {
return -1; return -1;
@ -1096,3 +1082,18 @@ int32_t taosCreateSocketWithTimeout(uint32_t timeout) {
#endif #endif
return (int)fd; return (int)fd;
} }
void taosWinSocketInit() {
#ifdef WINDOWS
static char flag = 0;
if (flag == 0) {
WORD wVersionRequested;
WSADATA wsaData;
wVersionRequested = MAKEWORD(1, 1);
if (WSAStartup(wVersionRequested, &wsaData) == 0) {
flag = 1;
}
}
#else
#endif
}