Commit e0a3ba54 authored by Moses DeJong's avatar Moses DeJong Committed by Alexandre Julliard

Added implementation for WSARecvEx function. This is a Microsoft

specific extension to the winsock API.
parent 582732e4
......@@ -59,5 +59,6 @@ type win16
115 pascal WSAStartup(word ptr) WSAStartup16
116 pascal WSACleanup() WSACleanup
151 pascal16 __WSAFDIsSet(word ptr) __WSAFDIsSet16
1107 pascal16 WSARecvEx(word ptr word ptr) WSARecvEx16
1999 pascal DllEntryPoint(long word word word long word) WINSOCK_LibMain
......@@ -257,6 +257,10 @@ typedef struct WSAData {
#endif
#define MSG_MAXIOVLEN 16
#ifndef MSG_PARTIAL
#define MSG_PARTIAL 0x8000 /* partial send or recv (WSARecvEx) */
#endif
/*
* Define constant based on rfc883, used by gethostbyxxxx() calls.
*/
......@@ -433,6 +437,8 @@ INT WINAPI WSACancelAsyncRequest(HANDLE hAsyncTaskHandle);
INT16 WINAPI WSAAsyncSelect16(SOCKET16 s, HWND16 hWnd, UINT16 wMsg, LONG lEvent);
INT WINAPI WSAAsyncSelect(SOCKET s, HWND hWnd, UINT uMsg, LONG lEvent);
INT16 WINAPI WSARecvEx16(SOCKET16 s, char *buf, INT16 len, INT16 *flags);
INT WINAPI WSARecvEx(SOCKET s, char *buf, INT len, INT *flags);
/*
* Address families
......
......@@ -2185,6 +2185,34 @@ INT16 WINAPI WSAAsyncSelect16(SOCKET16 s, HWND16 hWnd, UINT16 wMsg, LONG lEvent)
return (INT16)WSAAsyncSelect( s, hWnd, wMsg, lEvent );
}
/***********************************************************************
* WSARecvEx() (WSOCK32.1107)
*
* WSARecvEx is a Microsoft specific extension to winsock that is identical to recv
* except that has an in/out argument call flags that has the value MSG_PARTIAL ored
* into the flags parameter when a partial packet is read. This only applies to
* sockets using the datagram protocol. This method does not seem to be implemented
* correctly by microsoft as the winsock implementation does not set the MSG_PARTIAL
* flag when a fragmented packet arrives.
*/
INT WINAPI WSARecvEx(SOCKET s, char *buf, INT len, INT *flags) {
FIXME("(WSARecvEx) partial packet return value not set \n");
return WINSOCK_recv(s, buf, len, *flags);
}
/***********************************************************************
* WSARecvEx16() (WINSOCK.1107)
*
* See description for WSARecvEx()
*/
INT16 WINAPI WSARecvEx16(SOCKET16 s, char *buf, INT16 len, INT16 *flags) {
FIXME("(WSARecvEx16) partial packet return value not set \n");
return WINSOCK_recv16(s, buf, len, *flags);
}
/***********************************************************************
* __WSAFDIsSet() (WINSOCK.151)
......
......@@ -61,7 +61,7 @@ init WSOCK32_LibMain
#1104 stub rresvport
#1105 stub sethostname
#1106 stub dn_expand
1107 stub WSARecvEx
1107 stdcall WSARecvEx(long ptr long ptr) WSARecvEx
1108 stdcall s_perror(str) WS_s_perror
1109 stub GetAddressByNameA
1110 stub GetAddressByNameW
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment