mirror of
https://github.com/reactos/reactos.git
synced 2024-08-27 05:38:41 +00:00
![Colin Finck](/assets/img/avatar_default.png)
It currently tests the features I needed to adjust/implement when fixing the wininet problem. ReactOS currently passes all tests, but fails one if you launch the test app for the second time quickly after the first time (timing problem in the network code?). - Fix the behaviour on an ioctlsocket FIONREAD call: The output buffer is not touched, when we have no socket, but when we have no connection, it is set to 0. - Forward the socket call to WSASocketW instead of WSASocketA, minimal performance improvement svn path=/trunk/; revision=33824
37 lines
942 B
C
37 lines
942 B
C
/*
|
|
* PROJECT: ws2_32.dll API tests
|
|
* LICENSE: GPLv2 or any later version
|
|
* FILE: apitests/ws2_32/ws2_32.h
|
|
* PURPOSE: Main header file
|
|
* COPYRIGHT: Copyright 2008 Colin Finck <mail@colinfinck.de>
|
|
*/
|
|
|
|
#ifndef _WS2_32_APITESTS_H
|
|
#define _WS2_32_APITESTS_H
|
|
|
|
#include <winsock2.h>
|
|
|
|
#include "../apitest.h"
|
|
|
|
/* Simple macro for executing a socket command and doing cleanup operations in case of a failure */
|
|
#define SCKTEST(_cmd_) \
|
|
iResult = _cmd_; \
|
|
TEST(iResult != SOCKET_ERROR); \
|
|
if(iResult == SOCKET_ERROR) \
|
|
{ \
|
|
printf("Winsock error code is %u\n", WSAGetLastError()); \
|
|
closesocket(sck); \
|
|
WSACleanup(); \
|
|
return APISTATUS_ASSERTION_FAILED; \
|
|
}
|
|
|
|
/* helpers.c */
|
|
int CreateSocket(PTESTINFO pti, SOCKET* sck);
|
|
int ConnectToReactOSWebsite(PTESTINFO pti, SOCKET sck);
|
|
int GetRequestAndWait(PTESTINFO pti, SOCKET sck);
|
|
|
|
/* ws2_32.c */
|
|
extern HANDLE g_hHeap;
|
|
|
|
#endif
|