Parameters & Returns
Parameters
Returns
Quick Summary
Returns the number of bytes available to read from a socket.
Takes a handle (Int).
Returns the available byte count, or 0 if invalid or query fails (Int).
Technical Exegesis...
Queries the number of bytes that can be read from the socket without blocking. Works with both TCP and UDP sockets. Returns the available byte count, or 0 if the handle is invalid or if the query fails.
Uses ioctlsocket with FIONREAD to query the receive buffer. Checks both TCP and UDP socket maps. For TCP, indicates buffered stream data. For UDP, indicates complete datagrams ready. Useful for determining read buffer sizes and polling for data without blocking.