class

FastIRC::Reader

Inherits Reference / Object

Reads an IO stream and outputs a stream of Message objects.

TODO: use a circular buffer to reduce memory copies?

Constructors

new(io : IO, strict : Bool = false)

Creates a new Reader which reads from io. When strict is set, it will be passed to FastIRC.parse_line.

Source

Instance methods

next

Reads the next IRC message from the IO, or returns nil on EOF.

irc_reader = FastIRC::Reader.new(io)
while message = irc_reader.next
  message.command # => "PRIVMSG" : String
end
Source