Class: ROS::XMLRPCServer
- Inherits:
-
XMLRPC::WEBrickServlet
- Object
- XMLRPC::WEBrickServlet
- ROS::XMLRPCServer
- Defined in:
- lib/ros/xmlrpcserver.rb
Overview
original XMLRPC Server (remove access log)
Instance Method Summary collapse
-
#initialize(port = 8080, host = "127.0.0.1", maxConnections = 100, stdlog = "#{ENV['HOME']}/.ros/log/rosruby.log") ⇒ XMLRPCServer
constructor
A new instance of XMLRPCServer.
- #serve ⇒ Object
- #shutdown ⇒ Object
Constructor Details
#initialize(port = 8080, host = "127.0.0.1", maxConnections = 100, stdlog = "#{ENV['HOME']}/.ros/log/rosruby.log") ⇒ XMLRPCServer
Returns a new instance of XMLRPCServer.
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/ros/xmlrpcserver.rb', line 17 def initialize(port=8080, host="127.0.0.1", maxConnections=100, stdlog="#{ENV['HOME']}/.ros/log/rosruby.log") super({}) require 'webrick' @server = WEBrick::HTTPServer.new(:Port => port, :BindAddress => host, :MaxClients => maxConnections, :Logger => WEBrick::Log.new(stdlog), :AccessLog => []) @server.mount("/", self) end |
Instance Method Details
#serve ⇒ Object
31 32 33 |
# File 'lib/ros/xmlrpcserver.rb', line 31 def serve @server.start end |
#shutdown ⇒ Object
35 36 37 |
# File 'lib/ros/xmlrpcserver.rb', line 35 def shutdown @server.shutdown end |