class Thrift::ThinHTTPServer
Public Class Methods
new(processor, options={})
click to toggle source
Accepts a Thrift::Processor Options include:
-
:port
-
:ip
-
:path
-
:protocol_factory
# File lib/thrift/server/thin_http_server.rb, line 35 def initialize(processor, options={}) port = options[:port] || 80 ip = options[:ip] || "0.0.0.0" path = options[:path] || "/" protocol_factory = options[:protocol_factory] || BinaryProtocolFactory.new app = RackApplication.for(path, processor, protocol_factory) @server = Thin::Server.new(ip, port, app) end
Public Instance Methods
serve()
click to toggle source
Starts the server
# File lib/thrift/server/thin_http_server.rb, line 46 def serve @server.start end