Close (Socket function): Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{Template:Socket:Close subtitle}} | |||
This method terminates the sending and receiving of data on, and removes from use, | This method terminates the sending and receiving of data on, and removes from use, | ||
Line 10: | Line 5: | ||
The <var>Close</var> method, which may be invoked with a <var>Call</var> statement, has an effect | The <var>Close</var> method, which may be invoked with a <var>Call</var> statement, has an effect | ||
similar to its equivalent $function, <var>[[$Sock_Close]]</var>. | similar to its equivalent $function, <var>[[$Sock_Close]]</var>. | ||
==Syntax== | ==Syntax== | ||
{{Template:Socket:Close subtitle}} | |||
===Syntax terms=== | ===Syntax terms=== | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
Line 37: | Line 33: | ||
<p class="code">%sok:Close | <p class="code">%sok:Close | ||
</p> | </p> | ||
{{Template:Socket:Close footer}} |
Revision as of 23:02, 14 November 2011
Close this socket connection (Socket class)
This method terminates the sending and receiving of data on, and removes from use,
a Janus Sockets connection.
The Close method, which may be invoked with a Call statement, has an effect
similar to its equivalent $function, $Sock_Close.
Syntax
Close this socket connection (Socket class)
Syntax terms
%conn | If specified, this is a numeric variable to contain the returned value 1 from Close, indicating the connection is closed.
|
---|---|
%socko | A variable or an expression that is a reference to a Socket object. |
Usage notes
- In addition to closing the socket, the Close method destroys (discards) the object.
- Close is not affected by any
ONRESET
setting. If the socket for which it is invoked is in theRESET
state, Close continues to the next statement and does not set the last socket error information.
Example
The Close call signals that the program has completed all processing on the
%sok
socket:
%sok:Close