Class Session
In: lib/network/session.rb
Parent: Object
Session
Publisher
TopLevel

The session class is a base class contains the minimum amount of attributes to reasonably maintain a socket session with a client.

Methods

Included Modules

Publisher

Attributes

accepting  [RW] 
closing  [RW] 
connected  [RW] 
sock  [R] 
write_blocked  [RW] 

Public Class methods

Create a new session object Used when opening both an acceptor or connection.

server
The reactor or connector this session is associated with.
sock
Nil for acceptors or the socket for connections.
returns
A session object.

Public Instance methods

handle_close is called when a close event occurs for this session.

handle_input is called when an input event occurs for this session.

handle_oob is called when an out of band data event occurs for this session.

handle_output is called when an output event occurs for this session.

init is called before using the session.

returns
true is session object properly initialized

is_readable? tests if the socket is a candidate for select read {return] true if so, false if not

is_writable? tests if the socket is a candidate for select write {return] true if so, false if not

[Validate]