Class: Pvectl::Console::TerminalSession::SocketAdapter Private
- Inherits:
-
Object
- Object
- Pvectl::Console::TerminalSession::SocketAdapter
- Defined in:
- lib/pvectl/console/terminal_session.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Minimal adapter satisfying websocket-driver’s socket interface.
The driver calls #url to build the HTTP upgrade request and #write to send framed data over the wire.
Instance Attribute Summary collapse
-
#url ⇒ String
readonly
private
The WebSocket URL.
Instance Method Summary collapse
-
#initialize(url, socket) ⇒ SocketAdapter
constructor
private
Creates a new socket adapter.
-
#write(data) ⇒ Integer
private
Writes data to the underlying socket.
Constructor Details
#initialize(url, socket) ⇒ SocketAdapter
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Creates a new socket adapter.
433 434 435 436 |
# File 'lib/pvectl/console/terminal_session.rb', line 433 def initialize(url, socket) @url = url @socket = socket end |
Instance Attribute Details
#url ⇒ String (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the WebSocket URL.
426 427 428 |
# File 'lib/pvectl/console/terminal_session.rb', line 426 def url @url end |
Instance Method Details
#write(data) ⇒ Integer
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Writes data to the underlying socket.
443 444 445 |
# File 'lib/pvectl/console/terminal_session.rb', line 443 def write(data) @socket.write(data) end |