In Files

  • xmlrpc/server.rb

XMLRPC::Server

Public Class Methods

new(port=8080, host="127.0.0.1", maxConnections=4, stdlog=$stdout, audit=true, debug=true, *a) click to toggle source
 
               # File xmlrpc/server.rb, line 634
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
            

Public Instance Methods

serve() click to toggle source
 
               # File xmlrpc/server.rb, line 642
def serve
  signals = %w[INT TERM HUP] & Signal.list.keys
  signals.each { |signal| trap(signal) { @server.shutdown } }

  @server.start
end
            
shutdown() click to toggle source
 
               # File xmlrpc/server.rb, line 649
def shutdown
  @server.shutdown
end