Class: OsCtld::SendReceive::Server::ClientHandler
- Inherits:
-
Generic::ClientHandler
- Object
- Generic::ClientHandler
- OsCtld::SendReceive::Server::ClientHandler
- Defined in:
- lib/osctld/send_receive/server.rb
Instance Attribute Summary
Attributes inherited from Generic::ClientHandler
Instance Method Summary collapse
Methods inherited from Generic::ClientHandler
#communicate, #error, #error!, #initialize, #ok, #parse, #reply_error, #reply_ok, #request_stop, #send_data, #send_update, #server_version, #socket
Constructor Details
This class inherits a constructor from OsCtld::Generic::ClientHandler
Instance Method Details
#handle_cmd(req) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/osctld/send_receive/server.rb', line 10 def handle_cmd(req) cmd = SendReceive::Command.find(req[:cmd].to_sym) error!("Unsupported command '#{req[:cmd]}'") unless cmd cmd.run(internal: { handler: self }, **req[:opts]) end |
#log_type ⇒ Object
17 18 19 |
# File 'lib/osctld/send_receive/server.rb', line 17 def log_type self.class.name end |