Sockread » History » Version 1
Per Amundsen, 02/16/2014 12:25 AM
| 1 | 1 | Per Amundsen | _Added in 1.9.0_ |
|---|---|---|---|
| 2 | |||
| 3 | */sockread [-fn] [numbytes] <%var|&binvar>* |
||
| 4 | |||
| 5 | Reads bytes from the receive buffer into the specified variable. |
||
| 6 | |||
| 7 | If you specify a %var variable, a line of text ending with a Carriage Return/LineFeed is read into %var. The [[$crlf]] are stripped off (this may result in %var being [[$null]] if the line only consisted of [[$crlf]]). |
||
| 8 | |||
| 9 | If you specify a &binvar then [numbytes] of info is read into the binary variable. If no [numbytes] is specified it defaults to 4096 bytes. |
||
| 10 | |||
| 11 | *Switches* |
||
| 12 | |||
| 13 | -f - Forces AdiIRC to fill the %var variable with whatever text is in the receive buffer, even if it does not end in a [[$crlf]]. |
||
| 14 | -n - allows you to read a [[$crlf]] terminated line into a &binvar. If the incoming line does not contain a $crlf, no bytes will be read into &binvar, unless you specify the -f switch, which forces the read (same as when reading into %vars). |
||
| 15 | |||
| 16 | *Parameters* |
||
| 17 | |||
| 18 | [numbytes] - Number of bytes to read into &binvar. |
||
| 19 | <%var|&binvar> - %var or &binvar to read the data into. |