Module: WebSocket::Client::Simple

Defined in:
lib/websocket-client-simple.rb,
lib/websocket-client-simple/client.rb

Defined Under Namespace

Classes: Client

Class Method Summary collapse

Class Method Details

.connect(url, options = {}, logger) {|client| ... } ⇒ Object

Yields:

  • (client)


8
9
10
11
12
13
# File 'lib/websocket-client-simple/client.rb', line 8

def self.connect(url, options={}, logger)
  client = ::WebSocket::Client::Simple::Client.new
  yield client if block_given?
  client.connect url, options, logger
  return client
end