Home |
Sockets, IP, and Port Addresses Blocking and Non-Blocking Sockets |
Blocking and Non-Blocking SocketsSockets can be in either blocking or non-blocking mode which is controlled by calling function ioctlsocket. In blocking mode, the recv, send, connect (TCP only) and accept (TCP only) socket API calls will block indefinitely until the requested action has been performed. In non-blocking mode, these functions return immediately. select will block until the socket is ready. select takes a time-out parameter which controls the amount of time to wait for the action to complete or an error to be returned. Sockets, IP, and Port Addresses
|