28 swprintf(logBuf,
L"Received %d bytes from client", readBytes);
32 while (!
bShutdown && totalSentBytes < readBytes)
34 retVal =
send(
sock, readBuffer + totalSentBytes, readBytes - totalSentBytes, 0);
37 swprintf(logBuf,
L"Sent %d bytes back to client", retVal);
39 totalSentBytes += retVal;
60 }
while ((readBytes != 0) && (!
bShutdown));
VOID LogEvent(LPCWSTR lpMsg, DWORD errNum, DWORD exitCode, UINT flags)
VOID WINAPI ExitThread(IN DWORD uExitCode)
INT WSAAPI recv(IN SOCKET s, OUT CHAR FAR *buf, IN INT len, IN INT flags)
INT WSAAPI send(IN SOCKET s, IN CONST CHAR FAR *buf, IN INT len, IN INT flags)
static BOOL EchoIncomingPackets(SOCKET sock)
DWORD WINAPI EchoHandler(VOID *sock_)
BOOL ShutdownConnection(SOCKET sock, BOOL bRec)
int PASCAL FAR WSAGetLastError(void)