Class: Async::WebSocket::Client
- Inherits:
-
Connection
- Object
- Connection
- Async::WebSocket::Client
- Defined in:
- lib/async/websocket/client.rb
Overview
This is a basic synchronous websocket client:
Constant Summary
Constants inherited from Connection
Async::WebSocket::Connection::BLOCK_SIZE, Async::WebSocket::Connection::EVENTS
Instance Attribute Summary
Attributes inherited from Connection
Instance Method Summary collapse
-
#initialize(socket, url = "ws://.") ⇒ Client
constructor
A new instance of Client.
Methods inherited from Connection
#close, #next_event, #next_message, #send_message, #send_text, #write
Constructor Details
#initialize(socket, url = "ws://.") ⇒ Client
Returns a new instance of Client.
27 28 29 30 31 |
# File 'lib/async/websocket/client.rb', line 27 def initialize(socket, url = "ws://.") @url = url super socket, ::WebSocket::Driver.client(self) end |