class Protobuf::Rpc::SocketRunner
Attributes
server[RW]
Public Class Methods
new(options)
click to toggle source
# File lib/protobuf/rpc/servers/socket_runner.rb, line 11 def initialize(options) options = case when options.is_a?(OpenStruct) then options.marshal_dump when options.is_a?(Hash) then options when options.respond_to?(:to_hash) then options.to_hash else fail "Cannot parser Socket Server - server options" end self.server = ::Protobuf::Rpc::Socket::Server.new(options) end
Public Instance Methods
run() { || ... }
click to toggle source
# File lib/protobuf/rpc/servers/socket_runner.rb, line 26 def run yield if block_given? server.run end
running?()
click to toggle source
# File lib/protobuf/rpc/servers/socket_runner.rb, line 31 def running? server.running? end
stop()
click to toggle source
# File lib/protobuf/rpc/servers/socket_runner.rb, line 35 def stop server.stop end