Method: IdService::Server#initialize
- Defined in:
- lib/id_service/server.rb
#initialize(options = {}) ⇒ Server
Returns a new instance of Server.
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/id_service/server.rb', line 12 def initialize( = {}) .symbolize_keys! = .merge() @handler = IdGenerator.new() @processor = IdService::Processor.new(@handler) @server_transport = Thrift::ServerSocket.new([:hostname], [:port].to_s) @transport_factory = Thrift::BufferedTransportFactory.new() @protocol_factory = Thrift::BinaryProtocolFactory.new end |