Method: XMLRPC::Server#initialize

Defined in:
lib/xmlrpc/server.rb

#initialize(port = 8080, host = "127.0.0.1", maxConnections = 4, stdlog = $stdout, audit = true, debug = true, *a) ⇒ Server

Creates a new XMLRPC::Server instance, which is a XML-RPC server listening on the given port and accepts requests for the given host, which is localhost by default.

The server is not started, to start it you have to call XMLRPC::Server#serve.

The optional audit and debug parameters are obsolete!

All additionally provided parameters in *a are by-passed to XMLRPC::BasicServer.new.



575
576
577
578
579
580
581
# File 'lib/xmlrpc/server.rb', line 575

def initialize(port=8080, host="127.0.0.1", maxConnections=4, stdlog=$stdout, audit=true, debug=true, *a)
  super(*a)
  require 'webrick'
  @server = WEBrick::HTTPServer.new(:Port => port, :BindAddress => host, :MaxClients => maxConnections,
                                    :Logger => WEBrick::Log.new(stdlog))
  @server.mount("/", self)
end