soConfigNonblock (Function) |
Top Previous Next |
The soConfigNonblock function configure the non-blocking state of a socket.
When a socket is marked as blocking, the socket functions will block and wait until their function is completed. For example the soConnect function will block until the socket connection is established.
When a socket is marked as non-blocking, the socket functions will return immediately with error -4 (would block) instead of blocking. It is then up to the application to determine when the function is ready to complete. (In case of the example above, by calling the soStatus function to determine when the socket is connected)
Input: socket : SYSHANDLE Handle to the socket.
enable : BOOL Set TRUE to make the socket non-blocking and FALSE to make the socket blocking.
Returns: INT
Declaration: FUNCTION soConfigNonblock : INT;
Example:
|