Class: Revactor::Filter::Line
A filter for line based protocols which are framed using LF or CRLF encoding, such as IRC. Both LF and CRLF are supported and no validation is done on bare LFs for CRLF encoding. The output is chomped and delivered without any newline.
Constants
| Name | Value |
|---|---|
| MAX_LENGTH | 1048576 |
Public Class Methods
new (options = {})
Create a new Line filter. Accepts the following options:
delimiter: A character to use as a delimiter. Defaults to "\n"
Character sequences are not supported.
maxlength: Maximum length of a line
Public Instance Methods
decode (data)
Callback for processing incoming lines
encode (*data)
Encode lines using the current delimiter