Added stub for WSASend.

This commit is contained in:
Peter Hunnisett 2001-04-10 21:22:34 +00:00 committed by Alexandre Julliard
parent 21044c6319
commit de962afa56
3 changed files with 54 additions and 1 deletions

View File

@ -1863,6 +1863,53 @@ INT WINAPI WSOCK32_send(SOCKET s, char *buf, INT len, INT flags)
return SOCKET_ERROR;
}
/***********************************************************************
* 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)
*/

View File

@ -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

View File

@ -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;