AN_SET_BLOCKINGSection: Antinat Programmer's Manual (3)
Index Return to Main Contents
The an_set_blocking(3) function is used to switch sockets between blocking and non-blocking mode. In blocking mode, calls to read data from a socket will wait until some data is available to be read; in nonblocking mode, these calls will return immediately with an error condition. The only parts of the library which currently support non-blocking operation are in an_recv(3) and an_send(3). Currently, all other calls will silently switch to blocking mode, perform the operation, then switch back to the original blocking status. In order to switch to blocking mode, specify a zero parameter for blockingstatus. Use a non-zero parameter for non-blocking mode. Blocking mode is the default for all sockets.
s is a socket previously created with an_new_connection(3).
Malcolm Smith <email@example.com>
Time: 14:19:44 GMT, January 09, 2005