Zen API
|
Reads one or more bytes.
In blocking mode, this function will block until at least one byte is received (or a read timeout occurs).
In non-blocking mode, this function will read at least one byte. kSocket_Wait should be used to determine when this function can be called successfully.
If the socket was closed by the remote peer, this function will return kERROR_CLOSED.
socket | Socket object. |
buffer | Buffer to receive bytes. |
size | The maximum number of bytes to read. |
read | The number of bytes that were read. |