![]() |
|
| << Previous | Index | Next >> | |
| | |
int sock_dataready( void *s );
Description
Returns the number of bytes waiting to be read. If the socket is in ASCII mode, this function returns zero if a newline character has not been read or the buffer is not full. For UDP sockets, the function returns the number of bytes in the next datagram.
This function cannot tell the difference between no bytes to read and either a blank line or a UDP datagram with no data. For this reason, use
sock_bytesready()instead.Parameters
s
- Pointer to a socket.
Return value
0: No bytes to read;
or newline not yet read if the socket is in ASCII mode;
or (for DC 7.05 and later) if a UDP datagram has 0 bytes of data waiting to be read.
>0: Number of bytes ready to read.Library
NET.LIB (Prior to DC 7.05, this was DCRTCP.LIB)
See Also
| TCP/IP Manual Vol 1 |
<<Previous | Index | Next>> | rabbit.com |