A | B | C |  D | E | F |  G | H | I |  J | K | L |  M | N | O |  P | Q | R |  S | T | U |  V | W | X |  Y | Z


The Windows Sockets recv function receives data on a socket.

Declare Function recv Lib "wsock32.dll" (ByVal s As Long, buf As Any, ByVal buflen As Long, ByVal flags As Long) As Long


Operating Systems Supported
Requires Windows Sockets 1.1


Parameter Information
- s
[in] A descriptor identifying a connected socket.

- buf
[out] A buffer for the incoming data.

- len
[in] The length of buf.

- flags
[in] A flag specifying the way in which the call is made.

Return Values
If no error occurs, recv returns the number of bytes received. If the connection has been gracefully closed, the return value is zero. Otherwise, a value of SOCKET_ERROR is returned, and a specific error code can be retrieved by calling WSAGetLastError.

Last update: 07 April 2006