<< Previous | Index | Next >>

sock_xfastread


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

Description

Reads up to len bytes from dp on socket s. If possible this function fills the buffer, otherwise only the number of bytes immediately available if any are returned. This function is only valid for TCP sockets. For UDP sockets, use udp_recv() or udp_recvfrom().

This function is identical to sock_fastread(), except that it reads into an extended memory buffer.

Parameters

s

Pointer to socket.

dp

Buffer to place bytes that are read, as an xmem address obtained from, for example, xalloc().

len

Maximum number of bytes to write to the buffer.

Return Value

Number of bytes read or -1 if there was an error.

Library

TCP.LIB

See Also

sock_read, sock_fastwrite, sock_write, sockerr, udp_recv, udp_recvfrom, sock_fastread


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