Capture (Socket function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
Line 25: Line 25:
</td></tr>
</td></tr>
<tr><th>value</th>
<tr><th>value</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>



Revision as of 21:46, 8 November 2011

<section begin=dpl_desc/><section end=dpl_desc/>

Capture is a member of the 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

[%str =] %socko:Capture(value)

Syntax terms

%str 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.
%socko A variable or an expression that is a reference to a Socket object.
value 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".