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 35 def initialize(processor, options={}) 36 port = options[:port] || 80 37 ip = options[:ip] || "0.0.0.0" 38 path = options[:path] || "/" 39 protocol_factory = options[:protocol_factory] || BinaryProtocolFactory.new 40 app = RackApplication.for(path, processor, protocol_factory) 41 @server = Thin::Server.new(ip, port, app) 42 end
Public Instance Methods
serve()
click to toggle source
Starts the server
# File lib/thrift/server/thin_http_server.rb 46 def serve 47 @server.start 48 end