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