Class: WebSocket::Client
- Defined in:
- lib/websocket_client.rb
Overview
The WebSocket::Client class
Instance Method Summary collapse
-
#initialize(options = {}, &block) ⇒ Client
constructor
A new instance of Client.
- #to_s ⇒ Object (also: #inspect)
Methods included from Listenable
#add_listener, #listeners, #notify, #remove_listener, #replace_listeners
Methods included from ClientInstanceMethods
#channelActive, #channelInactive, #client_has_shut_down, #close, #connect, #execute_command, #gets, #invoke_user_app, #messageReceived, #ping, #puts, #read_user_commands, #session, #shut_down_callbacks, #shutdown, #when_client_has_shut_down
Methods included from ClientInitializationMethods
#bootstrap, #channel_initializer, #client_group, #configure_from_uri, #configure_handlers, #init, #logging_handler, #validate_scheme
Constructor Details
#initialize(options = {}, &block) ⇒ Client
Returns a new instance of Client.
428 429 430 431 432 433 |
# File 'lib/websocket_client.rb', line 428 def initialize( = {}, &block) init(::WebSocket.client_config.merge()) configure_handlers(&block) connect session end |
Instance Method Details
#to_s ⇒ Object Also known as: inspect
435 436 437 |
# File 'lib/websocket_client.rb', line 435 def to_s format('#<%<class>s:0x%<id>s>', class: self.class.name, id: object_id.to_s(16)) end |