start

start(maxConnections = -1) Instance Public methods Start the server if it isn't already running maxConnections override maxConnections given to the constructor. A negative value indicates that the value from the constructor should be used.

stop 2

stop() Instance Public methods Stop the server

stopped?

stopped?() Instance Public methods Returns true if the server has stopped.

connecting

connecting(client) Instance Protected methods Called when a client connects, if auditing is enabled. client a TCPSocket instance representing the client that connected Return true to allow this client to connect, false to prevent it.

disconnecting

disconnecting(clientPort) Instance Protected methods Called when a client disconnects, if audition is enabled. clientPort the port of the client that is connecting

error

error(detail) Instance Protected methods Called if debug is true whenever an unhandled exception is raised. This implementation simply logs the backtrace. detail the Exception that was caught

log

log(msg) Instance Protected methods Log a message to stdlog, if it's defined. This implementation outputs the timestamp and message to the log. msg the message to log

starting

starting() Instance Protected methods Called when the server is starting up, if auditing is enabled.

stopping

stopping() Instance Protected methods Called when the server is shutting down, if auditing is enabled.

[]

Hash[ key, value, ... ] â new_hashHash[ [ [key, value], ... ] ] â new_hashHash[ object ] â new_hash Class Public methods Creates a new hash populated with the given objects. Equivalent to the literal { key => value, ... }. In the first form, keys and values occur in pairs, so there must be an even number of arguments. The second and third form take a single argument which is either an array of key-value pairs or an object convertible to a hash. Hash["