Capture (Socket function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{Template:Socket:Capture subtitle}}
<span class="pageSubtitle"><section begin=dpl_desc/><section end=dpl_desc/></span>
[[Category:Socket methods|Capture function]]
<p>
<var>Capture</var> is a member of the <var>[[Socket class|Socket]]</var> class.
</p>
 


This method
This method
specifies whether print output should be sent as lines on a <var class="product">Janus Sockets</var> connection.
specifies whether print output should be sent as lines on a <var class="product">Janus Sockets</var> connection.
The method, which may be invoked with a CALL statement,
The method, which may be invoked with a <var>Call</var> statement,
has an effect similar to its equivalent $function,
has an effect similar to its equivalent $function,
<var>[[$Sock_Capture]]</var>.
<var>[[$Sock_Capture]]</var>.
==Syntax==
==Syntax==
<p class="syntax">[%str =] %socko:Capture(value)
{{Template:Socket:Capture syntax}}
</p>


===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%str</th>
<tr><th>%string</th>
<td>Optional return string, which contains the value of the socket's previous print capture setting. If the socket is not open, and <code>ONRESET CONTINUE</code> is in effect for the socket, <var>Capture</var> returns the string <code>RESET</code>. For information about <code>ONRESET CONTINUE</code>, see the <var>[[Set (Socket function)|Set]]</var> method.
<td>Optional return string, which contains the value of the socket's previous print capture setting. If the socket is not open, and <code>ONRESET CONTINUE</code> is in effect for the socket, <var>Capture</var> returns the string <code>RESET</code>. For information about <code>ONRESET CONTINUE</code>, see the <var>[[Set (Socket function)|Set]]</var> method.
</td></tr>
</td></tr>
<tr><th>%socko</th>
<tr><th>socket</th>
<td>A variable or an expression that is a reference to a <var>Socket</var> object.
<td>A variable or an expression that is a reference to a <var>Socket</var> object.
</td></tr>
</td></tr>
<tr><th>value</th>
<tr><th>string</th>
<td>The print capture setting for the socket. It is a string whose valid values are: <table> <tr><th>OFF </th><td>Do not capture print output to this socket.
<td>The print capture setting for the socket. It is a string whose valid values are:  
</td></tr>
<table>  
<tr><th>ON
<tr><th><var>OFF</var> </th>
</th><td>Capture print output to this socket.
<td>Do not capture print output to this socket. </td></tr>
</td></tr></table>
<tr><th><var>ON</var> </th>
<td>Capture print output to this socket. </td></tr>
</table>
</td></tr></table>
</td></tr></table>


Line 44: Line 40:
For information about "print" output, see [[$Sock_Capture#Print capturing hierarchy and other considerations|"Print
For information about "print" output, see [[$Sock_Capture#Print capturing hierarchy and other considerations|"Print
capturing hierarchy and other considerations"]].
capturing hierarchy and other considerations"]].
{{Template:Socket:Capture footer}}

Latest revision as of 22:57, 14 November 2011

Should print output be sent on the socket? (Socket class)


This method specifies whether print output should be sent as lines on a Janus Sockets connection. The method, which may be invoked with a Call statement, has an effect similar to its equivalent $function, $Sock_Capture.

Syntax

[%string =] socket:Capture( string)

Syntax terms

%string Optional return string, which contains the value of the socket's previous print capture setting. If the socket is not open, and ONRESET CONTINUE is in effect for the socket, Capture returns the string RESET. For information about ONRESET CONTINUE, see the Set method.
socket A variable or an expression that is a reference to a Socket object.
string The print capture setting for the socket. It is a string whose valid values are:
OFF Do not capture print output to this socket.
ON Capture print output to this socket.

Usage notes

  • Unlike $Sock_Capture, capturing to multiple sockets is not supported with a Socket object.
  • Each captured print line is followed by a LINEND string, if the socket has one set in its definition or by the Set method.
  • If FIN is sent (using either the Send or SendWithLineEnd method), print capturing is automatically turned OFF for the socket.

For information about "print" output, see "Print capturing hierarchy and other considerations".