25 const char szDummyBytes[
RECV_BUF] = {0xFF, 0x00, 0xFF, 0x00};
39 ok(iResult == 0,
"WSAStartup failed, iResult == %d\n", iResult);
50 ok(0,
"CreateSocket failed. Aborting test.\n");
63 ok(0,
"ConnectToReactOSWebsite failed. Aborting test.\n");
70 ok(0,
"GetRequestAndWait failed. Aborting test.\n");
94 ok(0,
"Failed to create event\n");
114 ok(
status == 0,
"Read failed with status 0x%x\n", (
unsigned int)
status);
140 } receivers[4] = { 0 };
141 DWORD bytesTransferred;
149 skip(
"Failed to initialize WinSock, error %d\n",
ret);
225 ok(
ret == 4,
"recv (1) returned %d\n",
ret);
232 ok(
ret == 0,
"recv (2) returned %d\n",
ret);
237 ok(
ret == 0,
"recv (3) returned %d\n",
ret);
274 wsaBuf.
len =
sizeof(receivers[
i].buffer);
275 wsaBuf.
buf = receivers[
i].buffer;
276 receivers[
i].flags = 0;
299 ok(
ret ==
FALSE,
"[%Iu] WSAGetOverlappedResult returned %d\n",
i,
ret);
312 bytesTransferred = 0x55555555;
319 ok(
ret ==
TRUE,
"WSAGetOverlappedResult returned %d\n",
ret);
320 ok(
flags == 0,
"WSAGetOverlappedResult returned flags 0x%lx\n",
flags);
321 ok(bytesTransferred == 4,
"WSAGetOverlappedResult returned %lu bytes\n", bytesTransferred);
322 receivers[0].buffer[4] = 0;
334 ok(
ret ==
FALSE,
"[%Iu] WSAGetOverlappedResult returned %d\n",
i,
ret);
346 bytesTransferred = 0x55555555;
353 ok(
ret ==
TRUE,
"[%Iu] WSAGetOverlappedResult returned %d\n",
i,
ret);
354 ok(
flags == 0,
"[%Iu] WSAGetOverlappedResult returned flags 0x%lx\n",
i,
flags);
355 ok(bytesTransferred == 0,
"[%Iu] WSAGetOverlappedResult returned %lu bytes\n",
i, bytesTransferred);
361 ok(
ret == 0,
"recv (N+1) returned %d\n",
ret);
366 ok(
ret == 0,
"recv (N+2) returned %d\n",
ret);
int strcmp(const char *String1, const char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
BOOL WSAAPI WSACloseEvent(IN WSAEVENT hEvent)
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 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)
INT WINAPI WSAStartup(IN WORD wVersionRequested, OUT LPWSADATA lpWSAData)
GLenum GLintptr readOffset
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define memcpy(s1, s2, n)
int GetRequestAndWait(SOCKET sck)
int ConnectToReactOSWebsite(SOCKET sck)
static void Test_Overread(void)
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
NTSTATUS NTAPI NtCreateEvent(OUT PHANDLE EventHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN EVENT_TYPE EventType, IN BOOLEAN InitialState)
NTSTATUS NTAPI NtReadFile(HANDLE FileHandle, HANDLE Event, PIO_APC_ROUTINE ApcRoutine, PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, PVOID Buffer, ULONG Length, PLARGE_INTEGER ByteOffset, PULONG Key)
namespace GUID const ADDRINFOEXW ADDRINFOEXW struct timeval OVERLAPPED * overlapped
INT WSAAPI getsockname(IN SOCKET s, OUT LPSOCKADDR name, IN OUT INT FAR *namelen)
INT WSAAPI listen(IN SOCKET s, IN INT backlog)
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)
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)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
static void CreateSocket(void)
#define WSA_FLAG_OVERLAPPED
WINSOCK_API_LINKAGE WSAEVENT WSAAPI WSACreateEvent(void)
#define WSA_IO_INCOMPLETE
int PASCAL FAR WSAGetLastError(void)
int PASCAL FAR WSACleanup(void)