SELECT synchronizes processing of several sockets operating in non-blocking mode. Sockets that are ready for reading, ready for writing, or have a pending exceptional condition can be selected. If no sockets are ready for processing, SELECT can block indefinitely or wait for a specified period of time (which may be zero) and then return.
SELECT examines the socket descriptors specified by read-list, write-list, and exception-list to see if some are ready for reading, ready for writing, or have an exceptional condition pending, respectively. On return, SELECT updates each of the lists to indicate which socket descriptors are ready for the requested operation. The total number of ready descriptors in all the lists is returned.
SELECTX has the same functionality as SELECT with the additional capability of waiting on one or more ECBs in addition to a time interval. This allows interruption of a wait if an external event occurs.
Assembler
label #SOCKET SELECT,
RETCODE=return-code,
ERRNO=errno,
RSNCODE=reason-code,
NFDS=number-of-socket-descriptors,
READLST=read-list,
READLSTL=read-list-length,
WRITLST=write-list,
WRITLSTL=write-list-length,
EXCELST=exception-list,
EXCELSTL=exception-list-length,
OPTION=option,
TIMEOUT=timeval-structure,
RETNFDS=returned-number-of-descriptors,
PLIST=parameter-list-area,
RGSV=(rgsv)
label #SOCKET SELECTX,
RETCODE=return-code,
ERRNO=errno,
RSNCODE=reason-code,
NFDS=number-of-socket-descriptors,
READLST=read-list,
READLSTL=read-list-length,
WRITLST=write-list,
WRITLSTL=write-list-length,
EXCELST=exception-list,
EXCELSTL=exception-list-length,
OPTION=option,
TIMEOUT=timeval-structure,
ECB=ecb,
ECBLIST=ecb-list,
RETNFDS=returned-number-of-descriptors,
PLIST=parameter-list-area,
RGSV=(rgsv)
List of USING Parameters
SOCKET-FUNCTION-SELECT, return-code, errno, reason-code, number-of-socket-descriptors, read-list, read-list-length, write-list, write-list-length, exception-list, exception-list-length, option, timeval-structure, returned-number-of-descriptors SOCKET-FUNCTION-SELECTX, return-code, errno, reason-code, number-of-socket-descriptors, read-list, read-list-length, write-list, write-list-length, exception-list, exception-list-length, option, timeval-structure, ecb, ecb-list, returned-number-of-descriptors
|
Copyright © 2014 CA.
All rights reserved.
|
|