<< Previous | Index | Next >>

sock_tbleft


int sock_tbleft( void *s );

Description

Gets the number of bytes left in the transmit buffer. If you do not wish to block, you may first query how much space is available for writing by calling this function before generating data that must be transmitted. This removes the need for your application to also buffer data.

Parameters

s

Pointer to a socket.

Return value

Number of bytes left in the transmit buffer.

Library

NET.LIB (Prior to DC 7.05, this was DCRTCP.LIB)

See also

sock_rbsize, sock_rbused, sock_rbleft, sock_tbsize, sock_tbused


if ( sock_tbleft( s ) > 10 ) {

   /* we can send up to 10 bytes without blocking or overflowing */
...
}


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