Class: Telnet::Server
- Includes:
- InstanceMethods
- Defined in:
- lib/telnet/server.rb
Overview
The Server class sets up the netty server
Instance Method Summary collapse
- #bootstrap ⇒ Object
-
#initialize(options = {}, *handlers, &block) ⇒ Server
constructor
A new instance of Server.
Methods included from InstanceMethods
#channel_active, #channel_read_complete, #close, #exception_caught, #handle_empty_request, #handle_message, #message_received, #quit_command?
Constructor Details
#initialize(options = {}, *handlers, &block) ⇒ Server
Returns a new instance of Server.
25 26 27 28 |
# File 'lib/telnet/server.rb', line 25 def initialize( = {}, *handlers, &block) raise ArgumentError, 'Parameter may not be nil: options' if .nil? super(::Telnet.server_config.merge(), *handlers, &block) end |
Instance Method Details
#bootstrap ⇒ Object
30 31 32 33 |
# File 'lib/telnet/server.rb', line 30 def bootstrap super @bootstrap.childOption(Java::io.netty.channel.ChannelOption::SO_KEEPALIVE, true) end |