Lines Matching refs:winSock

134 } winSock;  variable
326 winSock.hModule = LoadLibraryA("wsock32.dll"); in InitSockets()
328 if (winSock.hModule == NULL) { in InitSockets()
336 winSock.accept = (LPFN_ACCEPT) in InitSockets()
337 GetProcAddress(winSock.hModule, "accept"); in InitSockets()
338 winSock.bind = (LPFN_BIND) in InitSockets()
339 GetProcAddress(winSock.hModule, "bind"); in InitSockets()
340 winSock.closesocket = (LPFN_CLOSESOCKET) in InitSockets()
341 GetProcAddress(winSock.hModule, "closesocket"); in InitSockets()
342 winSock.connect = (LPFN_CONNECT) in InitSockets()
343 GetProcAddress(winSock.hModule, "connect"); in InitSockets()
344 winSock.gethostbyaddr = (LPFN_GETHOSTBYADDR) in InitSockets()
345 GetProcAddress(winSock.hModule, "gethostbyaddr"); in InitSockets()
346 winSock.gethostbyname = (LPFN_GETHOSTBYNAME) in InitSockets()
347 GetProcAddress(winSock.hModule, "gethostbyname"); in InitSockets()
348 winSock.gethostname = (LPFN_GETHOSTNAME) in InitSockets()
349 GetProcAddress(winSock.hModule, "gethostname"); in InitSockets()
350 winSock.getpeername = (LPFN_GETPEERNAME) in InitSockets()
351 GetProcAddress(winSock.hModule, "getpeername"); in InitSockets()
352 winSock.getservbyname = (LPFN_GETSERVBYNAME) in InitSockets()
353 GetProcAddress(winSock.hModule, "getservbyname"); in InitSockets()
354 winSock.getsockname = (LPFN_GETSOCKNAME) in InitSockets()
355 GetProcAddress(winSock.hModule, "getsockname"); in InitSockets()
356 winSock.getsockopt = (LPFN_GETSOCKOPT) in InitSockets()
357 GetProcAddress(winSock.hModule, "getsockopt"); in InitSockets()
358 winSock.htons = (LPFN_HTONS) in InitSockets()
359 GetProcAddress(winSock.hModule, "htons"); in InitSockets()
360 winSock.inet_addr = (LPFN_INET_ADDR) in InitSockets()
361 GetProcAddress(winSock.hModule, "inet_addr"); in InitSockets()
362 winSock.inet_ntoa = (LPFN_INET_NTOA) in InitSockets()
363 GetProcAddress(winSock.hModule, "inet_ntoa"); in InitSockets()
364 winSock.ioctlsocket = (LPFN_IOCTLSOCKET) in InitSockets()
365 GetProcAddress(winSock.hModule, "ioctlsocket"); in InitSockets()
366 winSock.listen = (LPFN_LISTEN) in InitSockets()
367 GetProcAddress(winSock.hModule, "listen"); in InitSockets()
368 winSock.ntohs = (LPFN_NTOHS) in InitSockets()
369 GetProcAddress(winSock.hModule, "ntohs"); in InitSockets()
370 winSock.recv = (LPFN_RECV) in InitSockets()
371 GetProcAddress(winSock.hModule, "recv"); in InitSockets()
372 winSock.select = (LPFN_SELECT) in InitSockets()
373 GetProcAddress(winSock.hModule, "select"); in InitSockets()
374 winSock.send = (LPFN_SEND) in InitSockets()
375 GetProcAddress(winSock.hModule, "send"); in InitSockets()
376 winSock.setsockopt = (LPFN_SETSOCKOPT) in InitSockets()
377 GetProcAddress(winSock.hModule, "setsockopt"); in InitSockets()
378 winSock.socket = (LPFN_SOCKET) in InitSockets()
379 GetProcAddress(winSock.hModule, "socket"); in InitSockets()
380 winSock.WSAAsyncSelect = (LPFN_WSAASYNCSELECT) in InitSockets()
381 GetProcAddress(winSock.hModule, "WSAAsyncSelect"); in InitSockets()
382 winSock.WSACleanup = (LPFN_WSACLEANUP) in InitSockets()
383 GetProcAddress(winSock.hModule, "WSACleanup"); in InitSockets()
384 winSock.WSAGetLastError = (LPFN_WSAGETLASTERROR) in InitSockets()
385 GetProcAddress(winSock.hModule, "WSAGetLastError"); in InitSockets()
386 winSock.WSAStartup = (LPFN_WSASTARTUP) in InitSockets()
387 GetProcAddress(winSock.hModule, "WSAStartup"); in InitSockets()
395 if ((winSock.accept == NULL) || in InitSockets()
396 (winSock.bind == NULL) || in InitSockets()
397 (winSock.closesocket == NULL) || in InitSockets()
398 (winSock.connect == NULL) || in InitSockets()
399 (winSock.gethostbyname == NULL) || in InitSockets()
400 (winSock.gethostbyaddr == NULL) || in InitSockets()
401 (winSock.gethostname == NULL) || in InitSockets()
402 (winSock.getpeername == NULL) || in InitSockets()
403 (winSock.getservbyname == NULL) || in InitSockets()
404 (winSock.getsockname == NULL) || in InitSockets()
405 (winSock.getsockopt == NULL) || in InitSockets()
406 (winSock.htons == NULL) || in InitSockets()
407 (winSock.inet_addr == NULL) || in InitSockets()
408 (winSock.inet_ntoa == NULL) || in InitSockets()
409 (winSock.ioctlsocket == NULL) || in InitSockets()
410 (winSock.listen == NULL) || in InitSockets()
411 (winSock.ntohs == NULL) || in InitSockets()
412 (winSock.recv == NULL) || in InitSockets()
413 (winSock.select == NULL) || in InitSockets()
414 (winSock.send == NULL) || in InitSockets()
415 (winSock.setsockopt == NULL) || in InitSockets()
416 (winSock.socket == NULL) || in InitSockets()
417 (winSock.WSAAsyncSelect == NULL) || in InitSockets()
418 (winSock.WSACleanup == NULL) || in InitSockets()
419 (winSock.WSAGetLastError == NULL) || in InitSockets()
420 (winSock.WSAStartup == NULL)) in InitSockets()
458 if ((err = winSock.WSAStartup(WSA_VERSION_REQD, &wsaData)) != 0) { in InitSockets()
472 winSock.WSACleanup(); in InitSockets()
527 FreeLibrary(winSock.hModule); in InitSockets()
528 winSock.hModule = NULL; in InitSockets()
554 enabled = (winSock.hModule != NULL); in SocketsEnabled()
583 if (winSock.hModule) {
590 winSock.WSACleanup();
591 FreeLibrary(winSock.hModule);
592 winSock.hModule = NULL;
893 if (winSock.select(0, &readFds, NULL, NULL, &timeout) != 0) {
987 if (winSock.closesocket(infoPtr->socket) == SOCKET_ERROR) {
988 TclWinConvertWSAError((DWORD) winSock.WSAGetLastError());
1111 sock = winSock.socket(AF_INET, SOCK_STREAM, 0);
1140 if (winSock.bind(sock, (SOCKADDR *) &sockaddr,
1151 if (winSock.listen(sock, SOMAXCONN) == SOCKET_ERROR) {
1175 if (winSock.bind(sock, (SOCKADDR *) &mysockaddr,
1187 if (winSock.ioctlsocket(sock, (long) FIONBIO, &flag) == SOCKET_ERROR) {
1196 if (winSock.connect(sock, (SOCKADDR *) &sockaddr,
1198 TclWinConvertWSAError((DWORD) winSock.WSAGetLastError());
1233 winSock.ioctlsocket(sock, (long) FIONBIO, &flag);
1240 TclWinConvertWSAError((DWORD) winSock.WSAGetLastError());
1246 winSock.closesocket(sock);
1291 sockaddrPtr->sin_port = winSock.htons((u_short) (port & 0xFFFF));
1295 addr.s_addr = winSock.inet_addr(host);
1297 hostent = winSock.gethostbyname(host);
1601 newSocket = winSock.accept(infoPtr->socket, (SOCKADDR *)&addr,
1670 winSock.inet_ntoa(addr.sin_addr),
1671 winSock.ntohs(addr.sin_port));
1752 bytesRead = winSock.recv(infoPtr->socket, buf, toRead, 0);
1781 error = winSock.WSAGetLastError();
1863 bytesWritten = winSock.send(infoPtr->socket, buf, toWrite, 0);
1885 error = winSock.WSAGetLastError();
2075 err = winSock.WSAGetLastError();
2087 if (winSock.getpeername(sock, (LPSOCKADDR) &peername, &size)
2094 winSock.inet_ntoa(peername.sin_addr));
2099 hostEntPtr = winSock.gethostbyaddr(
2107 winSock.inet_ntoa(peername.sin_addr));
2109 TclFormatInt(buf, winSock.ntohs(peername.sin_port));
2124 TclWinConvertWSAError((DWORD) winSock.WSAGetLastError());
2138 if (winSock.getsockname(sock, (LPSOCKADDR) &sockname, &size)
2145 winSock.inet_ntoa(sockname.sin_addr));
2149 hostEntPtr = winSock.gethostbyaddr(
2157 winSock.inet_ntoa(sockname.sin_addr));
2159 TclFormatInt(buf, winSock.ntohs(sockname.sin_port));
2168 TclWinConvertWSAError((DWORD) winSock.WSAGetLastError());
2490 winSock.WSAAsyncSelect(infoPtr->socket, hwnd,
2497 winSock.WSAAsyncSelect(infoPtr->socket, hwnd, 0, 0);
2547 if (winSock.gethostname(hostname, sizeof(hostname)) == 0) { in Tcl_GetHostName()
2609 return winSock.getsockopt(s, level, optname, optval, optlen); in TclWinGetSockOpt()
2626 return winSock.setsockopt(s, level, optname, optval, optlen); in TclWinSetSockOpt()
2643 return winSock.ntohs(netshort); in TclWinNToHS()
2659 return winSock.getservbyname(name, proto); in TclWinGetServByName()