Class: Thrift::SimpleServer
- Inherits:
-
BaseServer
- Object
- BaseServer
- Thrift::SimpleServer
- Defined in:
- lib/thrift/server/simple_server.rb
Instance Method Summary collapse
Methods inherited from BaseServer
Constructor Details
This class inherits a constructor from Thrift::BaseServer
Instance Method Details
#serve ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/thrift/server/simple_server.rb', line 22 def serve begin @server_transport.listen loop do client = @server_transport.accept trans = @transport_factory.get_transport(client) prot = @protocol_factory.get_protocol(trans) begin loop do @processor.process(prot, prot) end rescue Thrift::TransportException, Thrift::ProtocolException ensure trans.close end end ensure @server_transport.close end end |