$Sock Num: Difference between revisions
mNo edit summary |
m (1 revision) |
(No difference)
|
Revision as of 02:53, 20 January 2012
Get selected socket numbers
Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is currently no direct OO equivalent for this $function.
$Sock_Num retrieves selected socket numbers.
Syntax
%nums = $Sock_Num[([selection])]
Syntax terms
%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. |
Usage notes
$Sock_Num does not have a socket number argument, and thus it is not affected by any ONRESET setting.
Examples
- In the following example,
%sock
contains the blank-delimited values of%c1
and%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
OPEN
socket numbers:%sock = $Sock_Num('NOT RESET')
- The following example shows how to retrieve the list of all
OPEN
socket numbers that have not received the FIN indicator:%sock = $Sock_Num('CONN OR FINS')