Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v2_1_10) is shown here.
new(port, host = DEFAULT_HOST, maxConnections = 4, stdlog = $stderr, audit = false, debug = false)
public
Create a new server
port |
the port, as a Fixnum, on which to listen
|
host |
the host to bind to
|
maxConnections |
the maximum number of simultaneous connections to accept
|
stdlog |
IO device on which to log messages
|
audit |
if true, lifecycle callbacks will be called. See #audit
|
debug |
if true, error messages are logged. See
#debug
|
# File lib/gserver.rb, line 222
def initialize(port, host = DEFAULT_HOST, maxConnections = 4,
stdlog = $stderr, audit = false, debug = false)
@tcpServerThread = nil
@port = port
@host = host
@maxConnections = maxConnections
@connections = []
@connectionsMutex = Mutex.new
@connectionsCV = ConditionVariable.new
@stdlog = stdlog
@audit = audit
@debug = debug
end