SocketWait

(Engine-Level Function)

Description: Wait for Socket Connect. This function returns true when a client connects to a socket offered by a socket server.
Returns: Boolean
Usage: Script or steady state.
Function Groups: Stream and Socket
Related to: ClientSocket | CloseStream | ServerSocket | SocketAttribs | SocketServerEnd | SocketServerStart | SRead | SWrite |
Format: SocketWait(Handle)
Parameters:  
Handle
Required. Any numeric expression for the socket server handle as returned from a SocketServerStart.
Comments: For a TCP connection, SocketWait triggers each time a new inbound connection is made. For UDP, SocketWait triggers each time a new datagram arrives for which there is no existing stream to store it in. A UDP datagram is stored in an existing stream if it is from the same IP and if it is received on the same port as the other datagrams in that stream. The UDP stream can be empty (having been drained) but still be regarded as ‘belonging’ to the IP that instantiated the stream.