class GenericServer

Overview

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: [] 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.

Direct Known Subclasses

Defined in:

devmail/generic_server.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(port : Int32) #

[View source]

Instance Method Detail

def build_session_handler(client) #

[View source]
def handle_session(client) #

[View source]
def run #

[View source]