Class: LiveConsole::IOMethods::SocketIO
- Inherits:
-
Object
- Object
- LiveConsole::IOMethods::SocketIO
- Includes:
- IOMethod
- Defined in:
- lib/live_console/io_methods/socket_io/socket_io.rb
Constant Summary collapse
- DefaultOpts =
{ :host => '127.0.0.1', }.freeze
- RequiredOpts =
DefaultOpts.keys + [:port]
Instance Method Summary collapse
- #get_connection ⇒ Object
-
#initialize(opts) ⇒ SocketIO
constructor
A new instance of SocketIO.
Methods included from IOMethod
Constructor Details
#initialize(opts) ⇒ SocketIO
Returns a new instance of SocketIO.
11 12 13 14 |
# File 'lib/live_console/io_methods/socket_io/socket_io.rb', line 11 def initialize(opts) super opts @server = TCPServer.new host, port end |
Instance Method Details
#get_connection ⇒ Object
16 17 18 |
# File 'lib/live_console/io_methods/socket_io/socket_io.rb', line 16 def get_connection LiveConsole::IOMethods::SocketIOConnection.new(@server, opts) end |