class

GenericServer

Inherits Reference < Object

This class starts a generic server, accepting multiple connections on the given port.

It is written to support a specific (but common) type of server that accepts lines that look like this: <COMMAND> [<PAYLOAD>] It reads the first word of the input, the command (e.g. QUIT or LIST) and passes it to a handler together with the payload. It will uppercase the command so that a session handler can ignore upper/lower case when processing commands.

Constructors

new(port : Int32)
Source

Instance methods

build_session_handler(client)
Source
handle_session(client)
Source