Class: HrrRbSsh::Server
- Inherits:
-
Object
- Object
- HrrRbSsh::Server
- Includes:
- Loggable
- Defined in:
- lib/hrr_rb_ssh/server.rb
Instance Attribute Summary
Attributes included from Loggable
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}, logger: nil) ⇒ Server
constructor
A new instance of Server.
- #start(io) ⇒ Object
Methods included from Loggable
#log_debug, #log_error, #log_fatal, #log_info, #log_warn
Constructor Details
#initialize(options = {}, logger: nil) ⇒ Server
Returns a new instance of Server.
18 19 20 21 |
# File 'lib/hrr_rb_ssh/server.rb', line 18 def initialize ={}, logger: nil self.logger = logger @options = end |
Class Method Details
.start(io, options = {}, logger: nil) ⇒ Object
13 14 15 16 |
# File 'lib/hrr_rb_ssh/server.rb', line 13 def self.start io, ={}, logger: nil server = self.new , logger: logger server.start io end |
Instance Method Details
#start(io) ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/hrr_rb_ssh/server.rb', line 23 def start io log_info { "start server service" } transport = Transport.new io, Mode::SERVER, @options, logger: logger authentication = Authentication.new transport, Mode::SERVER, @options, logger: logger connection = Connection.new authentication, Mode::SERVER, @options, logger: logger connection.start end |