11#define WSARecv_TIMEOUT 2000
24 ok(
count == 1,
"completion sould be called only once count = %d\n",
count);
25 ok(dwError == 0,
"dwError = %ld\n", dwError);
38 const char szDummyBytes[
RECV_BUF] = { 0xFF, 0x00, 0xFF, 0x00 };
48 char szGetRequest[] =
"GET / HTTP/1.0\r\n\r\n";
54 ok(iResult == 0,
"WSAStartup failed, iResult == %d\n", iResult);
71 skip(
"CreateSocket failed. Aborting test.\n");
89 skip(
"ConnectToReactOSWebsite failed. Aborting test.\n");
112 ok(dwSent ==
strlen(szGetRequest),
"dwSent %ld != %d\n", dwSent,
strlen(szGetRequest));
128 dwRecv =
sizeof(szBuf);
131 ok(dwRecv ==
sizeof(szBuf),
"dwRecv %ld != %d\n", dwRecv,
sizeof(szBuf));
134 buffers.len =
sizeof(szRecvBuf);
136 dwRecv =
sizeof(szRecvBuf);
149 ok(dwRecv ==
sizeof(szRecvBuf),
"dwRecv %ld != %d\n", dwRecv,
sizeof(szRecvBuf));
154 dwRecv =
sizeof(szBuf);
167 ok(dwRecv ==
sizeof(szBuf),
"dwRecv %ld != %d\n", dwRecv,
sizeof(szBuf));
168 ok(
memcmp(szRecvBuf, szBuf,
sizeof(szBuf)) == 0,
"MSG_PEEK shouldn't have moved the pointer\n");
171 dwRecv =
sizeof(szBuf);
186 ok(dwRecv ==
sizeof(szBuf),
"dwRecv %ld != %d\n", dwRecv,
sizeof(szBuf));
189 dwRecv =
sizeof(szBuf);
195 ok(
err == 0,
"WSARecv failed %d\n",
err);
196 ok(dwRecv ==
sizeof(szBuf),
"dwRecv %ld != %d and 0\n", dwRecv,
sizeof(szBuf));
void CALLBACK completion(DWORD dwError, DWORD cbTransferred, LPWSAOVERLAPPED lpOverlapped, DWORD dwFlags)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
#define INVALID_HANDLE_VALUE
VOID WSAAPI WSASetLastError(IN INT iError)
BOOL WSAAPI WSAResetEvent(IN WSAEVENT hEvent)
BOOL WSAAPI WSACloseEvent(IN WSAEVENT hEvent)
BOOL WSAAPI WSASetEvent(IN WSAEVENT hEvent)
DWORD WSAAPI WSAWaitForMultipleEvents(IN DWORD cEvents, IN CONST WSAEVENT FAR *lphEvents, IN BOOL fWaitAll, IN DWORD dwTimeout, IN BOOL fAlertable)
INT WSAAPI WSARecv(IN SOCKET s, IN OUT LPWSABUF lpBuffers, IN DWORD dwBufferCount, OUT LPDWORD lpNumberOfBytesRecvd, IN OUT LPDWORD lpFlags, IN LPWSAOVERLAPPED lpOverlapped, IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
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)
INT WSAAPI WSASend(IN SOCKET s, IN LPWSABUF lpBuffers, IN DWORD dwBufferCount, OUT LPDWORD lpNumberOfBytesSent, IN DWORD dwFlags, IN LPWSAOVERLAPPED lpOverlapped, IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
INT WINAPI WSAStartup(IN WORD wVersionRequested, OUT LPWSADATA lpWSAData)
GLuint GLuint GLsizei count
int WINAPI lstrlenA(LPCSTR lpString)
#define memcpy(s1, s2, n)
int ConnectToReactOSWebsite(SOCKET sck)
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED lpOverlapped
namespace GUID const ADDRINFOEXW ADDRINFOEXW struct timeval OVERLAPPED * overlapped
INT WSAAPI shutdown(IN SOCKET s, IN INT how)
BOOL WSAAPI WSAGetOverlappedResult(IN SOCKET s, IN LPWSAOVERLAPPED lpOverlapped, OUT LPDWORD lpcbTransfer, IN BOOL fWait, OUT LPDWORD lpdwFlags)
SOCKET WSAAPI WSASocketW(IN INT af, IN INT type, IN INT protocol, IN LPWSAPROTOCOL_INFOW lpProtocolInfo, IN GROUP g, IN DWORD dwFlags)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define WSA_FLAG_OVERLAPPED
WINSOCK_API_LINKAGE WSAEVENT WSAAPI WSACreateEvent(void)
int PASCAL FAR WSAGetLastError(void)
int PASCAL FAR WSACleanup(void)