$Sock Send: Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
mNo edit summary |
||
Line 9: | Line 9: | ||
==Syntax== | ==Syntax== | ||
<p class="syntax"><span class="squareb">[</span><span class="term">%rc</span><span class="literal"> =</span><span class="squareb">]</span><span class="literal"> $Sock_Send(</span><span class="term"> | <p class="syntax"><span class="squareb">[</span><span class="term">%rc</span><span class="literal"> =</span><span class="squareb">]</span><span class="literal"> $Sock_Send(</span><span class="term">sockNum</span><span class="literal">, </span><span class="term">string</span><span class="literal">, </span><span class="squareb">[</span><span class="term">opts</span><span class="squareb">]</span><span class="literal">)</span> </p> | ||
===Syntax terms=== | ===Syntax terms=== | ||
Line 15: | Line 15: | ||
<tr><th>%rc</th> | <tr><th>%rc</th> | ||
<td>A numeric value that is a numeric error code (described further [[#$Sock_Send return codes|below]]), or if the operation could not be performed as requested, a 0 value. For more details, see [[#$Sock_RecvPrs return values|"$Sock_RecvPrs return values"]]. </td></tr> | <td>A numeric value that is a numeric error code (described further [[#$Sock_Send return codes|below]]), or if the operation could not be performed as requested, a 0 value. For more details, see [[#$Sock_RecvPrs return values|"$Sock_RecvPrs return values"]]. </td></tr> | ||
<tr><th> | <tr><th>sockNum</th> | ||
<td>The socket number. </td></tr> | <td>The socket number. </td></tr> | ||
<tr><th>string</th> | <tr><th>string</th> |
Revision as of 03:41, 20 January 2012
Send string
Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is currently no direct OO equivalent for this $function.
$Sock_Send sends a string over a Janus Sockets connection.
It is also a callable function.
Syntax
[%rc =] $Sock_Send(sockNum, string, [opts])
Syntax terms
%rc | A numeric value that is a numeric error code (described further below), or if the operation could not be performed as requested, a 0 value. For more details, see "$Sock_RecvPrs return values". | ||||||||
---|---|---|---|---|---|---|---|---|---|
sockNum | The socket number. | ||||||||
string | The string to send. | ||||||||
opts | This optional argument is an option string, which can contain any of the following:
|
$Sock_Send return codes
- 0, if the function completes successfully.
- -1, if the socket is not open and ONRESET CONTINUE is in effect for the socket.
If you need to send line-end delimited information, use $Sock_SendLn.