Nonblocking I/O

When an application issues one of the socket input functions and there is no data to read, the function blocks and does not return until there is data to read.

Similarly, an application can block on a socket output function when data cannot be sent immediately. Finally, connect() and accept() can block while waiting for connection establishment with the partner's programs.

Start of changeSockets provide a method that enables application programs to issue functions that block so that the function returns without delay. This is done by either calling fcntl() to turn on the O_NONBLOCK flag, or calling ioctl() to turn on the FIONBIO flag. When running in this nonblocking mode, if a function cannot be completed without blocking, it returns immediately. A connect() might return with [EINPROGRESS], which means that the connection initiation has been started. You can then use the poll() or select() to determine when the connection has been completed. For all other functions that are affected by running in the nonblocking mode, an error code of [EWOULDBLOCK] indicates that the call was unsuccessful.End of change

You can use nonblocking with the following socket functions:
Related reference
Example: Nonblocking I/O and select()
Related information
fnctl()
accept()
ioctl()
recv()
send()
connect()
gsk_secure_soc_read()
gsk_secure_soc_write()
SSL_Read()
SSL_Write()
read()
readv()
recvfrom()
recvmsg()
send_file()
send_file64()
sendmsg()
sendto()
write()
writev()