class T2Server::ConnectionParameters

This is the base class for holding parameters for network connections. It delegates most work to the underlying Hash in which options are actually stored.

The parameters that can be set are:

All others will be ignored. Any parameters not set will return nil when queried.

Public Class Methods

new() click to toggle source

Create a new set of connection parameters with no defaults set.

# File lib/t2-server/net/parameters.rb, line 64
def initialize
  @params = {}

Public Instance Methods

[param] = value → value click to toggle source

Set a connection parameter. See the list of allowed parameters in the class description.

# File lib/t2-server/net/parameters.rb, line 73
def []=(param, value)
  @params[param] = value if ALLOWED_PARAMS.include?(param)