lib/turntabler/connection.rb
def start
      @socket = Faye::WebSocket::Client.new(url)
      @socket.onopen = lambda {|event| on_open(event)}
      @socket.onclose = lambda {|event| on_close(event)}
      @socket.onmessage = lambda {|event| on_message(event)}
      true
    end
def start
      @socket = Faye::WebSocket::Client.new(url)
      @socket.onopen = lambda {|event| on_open(event)}
      @socket.onclose = lambda {|event| on_close(event)}
      @socket.onmessage = lambda {|event| on_message(event)}
      true
    end
def start @socket = Faye :: WebSocket :: Client . new ( url ) @socket . onopen = lambda { | event | on_open ( event ) } @socket . onclose = lambda { | event | on_close ( event ) } @socket . onmessage = lambda { | event | on_message ( event ) } true end
Builds a new connection for sending / receiving data via the given url.

 @note This will *not* open the connection -- #start must be explicitly called in order to do so.
 @param [String] url The URL to open a conection to
 @param [Hash] options The connection options
 @option options [Fixnum] :timeout The amount of time to allow to elapse for requests before timing out
 @option options [Hash] :params A default set of params that will get included on every message sent
 @raise [ArgumentError] if an invalid option is specified
 Initiates the connection with turntable

 @return [true]
Builds a new connection for sending / receiving data via the given url .