<< Previous | Index | Next >>

sock_axread


int sock_axread( tcp_Socket *s, long dp, int len );

Description

Reads exactly len bytes from the socket or, if that amount of data is not yet available, do not read anything.

This function is available starting with DC 7.30. It is identical to sock_aread() except that the destination buffer is in xmem.

Parameters

s

Pointer to a TCP socket.

dp

Buffer to place bytes that are read.

len

Number of bytes to copy to the buffer.

Return Value

-1: len is greater than the total socket receive buffer size, hence this request could never be satisfied in one call.

-2: The socket is closed or closing, but insufficient data is in the buffer to satisfy the request.

-3: len < 0 or the socket parameter was invalid.

 0: Insufficient data is in the buffer to satisfy the request, or len was zero. Try again later since the socket is still able to receive data from the peer.

len: The len parameter is returned if there was sufficient data in the socket buffer to satisfy the request.

Library

TCP.LIB

See Also

sock_fastread, sock_xfastread, sock_fastwrite, sock_xfastwrite, sock_aread, sock_awrite, sock_axwrite


TCP/IP Manual
Vol 1
<<Previous | Index | Next>> rabbit.com