<< Previous | Index | Next >>

sock_axwrite


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

Description

Write exactly len bytes to the socket or, if that amount of data can not be written, do not write anything. This function is available starting with DC 7.30. It is identical to sock_awrite() except that the source buffer is in xmem.

Parameters

s

Pointer to a TCP socket.

dp

Buffer containing data to write.

len

Number of bytes to write to the socket 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 has been closed for further transmissions, e.g., because sock_close() has already been called.

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

 0: Insufficient free space in the transmit buffer to satisfy the request, or len was zero. Try again later since the peer will eventually acknowledge the receipt of previous data, freeing up transmit buffer space.

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

Library

TCP.LIB

See Also

sock_fastread, sock_xfastread, sock_fastwrite, sock_xfastwrite, sock_axread, sock_aread, sock_awrite


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