Class: Async::WebSocket::Client

Inherits:
Connection show all
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

#driver, #url

Instance Method Summary collapse

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