Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
select() call z/OS Communications Server: IP CICS Sockets Guide SC27-3649-00 |
|
The select() call is useful in processes where multiple operations can occur, and it is necessary for the program to be able to wait on one or several of the operations to complete. For example, consider a program that issues a read() to multiple sockets whose blocking mode is set. Because the socket blocks on a read() call, only one socket could be read at a time. Setting the sockets nonblocking solves this problem, but requires polling each socket repeatedly until data became available. The select() call allows you to test several sockets and to execute a subsequent I/O call only when one of the tested sockets is ready, thereby ensuring that the I/O call does not block. |
Copyright IBM Corporation 1990, 2014
|