Extracted from Pike v7.8 release 866 at 2016-11-06.
pike.ida.liu.se
[Top]
Protocols
Protocols.Line
Protocols.Line.simple

Class Protocols.Line.simple

Description

Simple nonblocking line-oriented I/O.


Constant line_separator

constant Protocols.Line.simple.line_separator

Description

The sequence separating lines from eachother. "\r\n" by default.


Variable handle_data

function(string:void) Protocols.Line.simple.handle_data

Description

If this variable has been set, multiple lines will be accumulated, until a line with a single "." (period) is received. handle_data() will then be called with the accumulated data as the argument.

Note

handle_data() is one-shot, ie it will be cleared when it is called.

The line with the single "." (period) will not be in the accumulated data.

See also

handle_command()


Variable send_q

ADT.Queue Protocols.Line.simple.send_q

Description

Queue of data that is pending to send.

The elements in the queue are either strings with data to send, or 0 (zero) which is the end of file marker. The connection will be closed when the end of file marker is reached.

See also

send() , disconnect()