z/OS Communications Server: IP IMS Sockets Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


IOCTL and FCNTL calls

z/OS Communications Server: IP IMS Sockets Guide
SC27-3653-00

In addition to SELECT, applications can use the IOCTL or FCNTL calls to help perform asynchronous (nonblocking) socket operations.

The IOCTL call has many functions; establishing blocking mode is only one of its functions. The value in COMMAND determines which function IOCTL will perform. The REQARG of 0 specifies non-blocking (a REQARG of 1 would request that socket S be set to blocking mode). When this socket is passed as a parameter to a call that would block (such as RECV when data is not present), the call returns with an error code in RETCODE, and ERRNO set to EWOULDBLOCK. Setting the mode of the socket to nonblocking allows an application to continue processing without becoming blocked.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014