$Sock Close: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
(Automatically generated page update)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:$Sock_Close}}
{{DISPLAYTITLE:$Sock_Close}}
<span class="pageSubtitle">Close Janus Sockets connection(s)</span>
<span class="pageSubtitle">Close Janus Sockets connection(s)</span>
<p class="warn"><b>Note: </b>Most Sirius $functions have been deprecated in favor of Object Oriented
<p class="warn"><b>Note: </b>Many $functions have been deprecated in favor of Object Oriented
methods. There is currently no direct OO equivalent for this $function.</p>
methods. The OO equivalent for <var>$Sock_Close</var> is the <var>[[Close (Socket function)|Close]]</var> method.</p>


<var>$Sock_Close</var> terminates the sending and receiving of data on, and removes from use,
<var>$Sock_Close</var> terminates the sending and receiving of data on, and removes from use,

Latest revision as of 00:00, 21 September 2018

Close Janus Sockets connection(s)

Note: Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for $Sock_Close is the Close method.

$Sock_Close terminates the sending and receiving of data on, and removes from use, one or all Janus Sockets connection(s).

Syntax

[%num =]$Sock_Close[([sockNum])]

Syntax terms

%num The number of of connections closed.
sockNum The number of a socket that is to be closed, or the value -1, which indicates that all the user's sockets should be closed. The default value of this optional argument is -1.

Usage notes

  • If socket is -1, indicating that all sockets are affected by the $Sock_Close call, then the returned number %num will be the number of sockets in use. Otherwise 1 is returned.
  • $Sock_Close is not affected by any ONRESET setting.

Examples

  1. In the following example, the $Sock_Close call signals that the program has completed all processing on the socket identified by the value in %sock:

    %count = $Sock_Close(%sock)

  2. The following call closes all socket connections the user has:

    %count = $Sock_Close(-1)