| INT InetWrite(
|
|
|
SOCKET hSocket, |
|
|
|
LPBYTE
lpBuffer, |
|
|
|
INT cbBuffer |
|
| );
|
The InetWrite function sends the specified number of
bytes to the remote host.
Parameters
- hSocket
- The socket handle.
- lpBuffer
- The pointer to the buffer which contains the data that is to be
sent to the remote host.
- cbBuffer
- The number of bytes to send from the specified buffer.
Return Value
If the function succeeds, the return value is the number of
bytes actually written. If the function fails, the return value is
INET_ERROR. To get extended error information, call
InetGetLastError.
Remarks
The return value may be less than the number of bytes specified
by the cbBuffer parameter. In this case, the data has been
partially written and it is the responsibility of the application
to send the remaining data at some later point. For non-blocking
connections, the program must wait for the INET_EVENT_WRITE
asynchronous notification message before it resumes sending
data.
Requirements
Client: Requires Windows Vista, Windows XP or Windows
2000 Professional.
Server: Requires Windows Server 2008, Windows Server 2003 or
Windows 2000 Server.
Header: Include cswsock6.h.
Library: Use cswskav6.lib.
See Also
InetFlush, InetRead, InetReadEx, InetWriteEx
|