Commit de962afa authored by Peter Hunnisett's avatar Peter Hunnisett Committed by Alexandre Julliard

Added stub for WSASend.

parent 21044c63
......@@ -1864,6 +1864,53 @@ INT WINAPI WSOCK32_send(SOCKET s, char *buf, INT len, INT flags)
}
/***********************************************************************
* WSASend (WSOCK32.72)
*/
INT WINAPI WSASend( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
LPDWORD lpNumberOfBytesSent, DWORD dwFlags,
LPWSAOVERLAPPED lpOverlapped,
LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine )
{
INT iFlags = 0;
INT rc = 0;
DWORD dwCount;
/* Overlapped is not supported or checked for */
FIXME( "(%u,%p,0x%lx,%p,0x%lx,%p,%p): semi stub\n",
s, lpBuffers, dwBufferCount, lpNumberOfBytesSent,
dwFlags, lpOverlapped, lpCompletionRoutine );
/* Convert setup flags */
if( dwFlags & MSG_DONTROUTE )
{
iFlags |= MSG_DONTROUTE;
}
if( dwFlags & MSG_OOB )
{
iFlags |= MSG_OOB;
}
/* Indicate nothing yet sent */
*lpNumberOfBytesSent = 0;
/* Send all buffers with the same flags */
for(dwCount = 0; dwCount < dwBufferCount; dwCount++ )
{
if( ( rc = WSOCK32_send( s, lpBuffers[ dwCount ].buf,
lpBuffers[ dwCount ].len, iFlags ) ) != 0 )
{
break;
}
/* Indicate that we've sent something */
*lpNumberOfBytesSent += lpBuffers[ dwCount ].len;
}
return rc;
}
/***********************************************************************
* send() (WINSOCK.19)
*/
INT16 WINAPI WINSOCK_send16(SOCKET16 s, char *buf, INT16 len, INT16 flags)
......
......@@ -84,7 +84,7 @@ debug_channels (winsock)
69 stub WSARecvFrom
70 stub WSARemoveServiceClass
71 forward WSAResetEvent KERNEL32.ResetEvent
72 stub WSASend
72 stdcall WSASend(long ptr long ptr long ptr ptr) WSASend
73 stub WSASendDisconnect
74 stub WSASendTo
75 stub WSASetEvent
......
......@@ -192,6 +192,12 @@ typedef struct _WSANETWORKEVENTS
int iErrorCode[FD_MAX_EVENTS];
} WSANETWORKEVENTS, *LPWSANETWORKEVENTS;
typedef struct _WSABUF
{
ULONG len;
CHAR* buf;
} WSABUF, *LPWSABUF;
typedef struct _OVERLAPPED * LPWSAOVERLAPPED;
typedef HANDLE WSAEVENT;
typedef unsigned int GROUP;
......
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