Class: Protobuf::Rpc::Socket::Server
- Inherits:
-
Object
- Object
- Protobuf::Rpc::Socket::Server
- Defined in:
- lib/protobuf/rpc/socket/server.rb
Instance Method Summary collapse
-
#initialize(options) ⇒ Server
constructor
A new instance of Server.
- #run(supervision: true) ⇒ Object
Constructor Details
#initialize(options) ⇒ Server
Returns a new instance of Server.
6 7 8 |
# File 'lib/protobuf/rpc/socket/server.rb', line 6 def initialize() @options = end |
Instance Method Details
#run(supervision: true) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/protobuf/rpc/socket/server.rb', line 10 def run(supervision: true) if supervision config = ::Celluloid::Supervision::Configuration.new config.add(type: Protobuf::Rpc::Socket::Runner, as: :rpc, args: @options) else Protobuf::Rpc::Socket::Runner.new(@options) end begin loop { sleep 60 } rescue Interrupt exit end end |