67 timeVal.
tv_sec = timeOut / 1000;
68 timeVal.
tv_usec = timeOut % 1000;
75 FD_SET(listeningSocket, &readFD);
88 L"Accepted connection to %s server from %S:%d",
106 swprintf(logBuf,
L"Failed to start worker thread for the %s server",
152 swprintf(logBuf,
L"FYI, received %d unexpected bytes during shutdown",
ret);
182 L"%s is waiting for connections on port %d",
VOID LogEvent(LPCWSTR lpMsg, DWORD errNum, DWORD exitCode, UINT flags)
VOID WINAPI ExitThread(IN DWORD uExitCode)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
INT WSAAPI recv(IN SOCKET s, OUT CHAR FAR *buf, IN INT len, IN INT flags)
INT WSAAPI select(IN INT s, IN OUT LPFD_SET readfds, IN OUT LPFD_SET writefds, IN OUT LPFD_SET exceptfds, IN CONST struct timeval *timeout)
static SOCKET SetUpListener(USHORT Port)
BOOL ShutdownConnection(SOCKET sock, BOOL bRec)
DWORD WINAPI StartServer(LPVOID lpParam)
static VOID AcceptConnections(SOCKET listeningSocket, LPTHREAD_START_ROUTINE lpService, LPWSTR lpName)
INT WSAAPI listen(IN SOCKET s, IN INT backlog)
INT WSAAPI shutdown(IN SOCKET s, IN INT how)
INT WSAAPI bind(IN SOCKET s, IN CONST struct sockaddr *name, IN INT namelen)
SOCKET WSAAPI accept(IN SOCKET s, OUT LPSOCKADDR addr, OUT INT FAR *addrlen)
SOCKET WSAAPI socket(IN INT af, IN INT type, IN INT protocol)
LPTHREAD_START_ROUTINE lpService
struct _Services * PSERVICES
static rfbScreenInfoPtr server
DWORD(WINAPI * LPTHREAD_START_ROUTINE)(LPVOID)
#define FD_ISSET(fd, set)
int PASCAL FAR WSAGetLastError(void)
struct sockaddr_in SOCKADDR_IN