Get selected socket numbers
Note: Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for $Sock_Num is the Num method.
$Sock_Num retrieves selected socket numbers.
%nums = $Sock_Num[([selection])]
|%nums||A string that contains blank-separated selected socket numbers in ascending order.|
|selection||A string that identifies which socket numbers to return. It is any combination of the following strings separated by OR, and each optionally prefixed by NOT:
If NOT prefixes one of the above specifications, then all in-use sockets (excluding the specified set) are included in the selected set. With multiple terms separated by OR, the specified sets are combined by the set union operation.
$Sock_Num does not have a socket number argument, and thus it is not affected by any ONRESET setting.
- In the following example,
%sockcontains the blank-delimited values of
%c2. Assuming no other client socket numbers were in use, this would result in
%sock = '2 3'.
JANUS DEFINE PIPE * CLSOCK 5 REMOTE * * SOCKPMAX 2 Begin %c1 is Float %c2 is Float %sock is String Len 255 %c1 = $Sock_conn('PIPE', 'www.ampas.org', 80) %c2 = $Sock_conn('PIPE', 'www.wga.org', 80) %sock = $Sock_Num ...
- The following example shows another way to retrieve the list of all
%sock = $Sock_Num('NOT RESET')
- The following example shows how to retrieve the list of all
OPENsocket numbers that have not received the FIN indicator:
%sock = $Sock_Num('CONN OR FINS')