socket_select [function]
socket_select( array readscl, array writescl, array errorscl[, real timeout ])
check socket lists for state, optionally specifying maximum wait time
readscl
- list of sockets to be checked for readabilitywritescl
- list of sockets to be checked for writabilityerrorscl
- list of sockets to be checked for errorstimeout
- optional checking timeout, function waits indefinitely if not specified- the function returns as soon as at least one socket is in the required state or if time limit was reached
- return values:
- -1 on error - >0 if sockets have acquired the necessary states (the total number of such sockets is returned) - 0 if time limit was reached