| Did you know ... | Search Documentation: |
| Instance variables |
<-record_separator
and stream<-input_message.<-record_separator)
is available, this code is executed with the following bindings:
@receiver: the stream object @arg1: a string object holding the data
Note: when using a socket
object, the receiver of the stream->input_message
must be @receiver
as the actual connections are running on a
object<-clone’ed
socket.
<-read_line.<-read_line.|int*<-input_message.
If the data arriving from the stream contains multiple records, the
stream<-input_message
will be called with each record separately.
The default record separator is’\n’(newline),
which implies that input is split into physical lines.
If stream<-record_separator
is an integer, the input is split into records of the indicated size.
This is useful for receiving binary data that is organised in records.
If you just want to collect all data from the process, it is advised
to set the stream<-record_separator
to @nil,
disabling the input filtering.
The stream->record_separator
may be changed on an open connection. Changing the record separator will
immediately scan the data in the input buffer and dispatch any complete
record according to the new definition. Setting the separator to @nil
will run the stream<-input_message
using the data in the buffer and destroy the buffer.