Class: NIO::WebSocket::Adapter::Client
- Inherits:
-
NIO::WebSocket::Adapter
- Object
- RawAdapter
- NIO::WebSocket::Adapter
- NIO::WebSocket::Adapter::Client
- Defined in:
- lib/nio/websocket/adapter/client.rb
Instance Attribute Summary collapse
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Attributes inherited from NIO::WebSocket::Adapter
Attributes inherited from RawAdapter
#closing, #inner, #monitor, #options
Instance Method Summary collapse
-
#initialize(url, io, options) ⇒ Client
constructor
A new instance of Client.
Methods inherited from NIO::WebSocket::Adapter
Methods inherited from RawAdapter
#add_to_reactor, #close, #pump_buffer, #read, #teardown, #write
Constructor Details
#initialize(url, io, options) ⇒ Client
Returns a new instance of Client.
7 8 9 10 11 12 13 |
# File 'lib/nio/websocket/adapter/client.rb', line 7 def initialize(url, io, ) @url = url driver = ::WebSocket::Driver.client(self, [:websocket_options] || {}) super io, driver, WebSocket.logger.debug "Initiating handshake on #{io}" driver.start end |
Instance Attribute Details
#url ⇒ Object (readonly)
Returns the value of attribute url.
14 15 16 |
# File 'lib/nio/websocket/adapter/client.rb', line 14 def url @url end |