def open
      # Create the background thread
      self.thread = Thread.new do
        EM.tick_loop do
          unless self.cmd_queue.empty?
            command = self.cmd_queue.pop
            self._execute_command(command)
          end
        end
        self.wamp.open
      end
    end
def open
      # Create the background thread
      self.thread = Thread.new do
        EM.tick_loop do
          unless self.cmd_queue.empty?
            command = self.cmd_queue.pop
            self._execute_command(command)
          end
        end
        self.wamp.open
      end
    end
Constructor for creating a client.  Options are
 @param options [Hash] The different options to pass to the connection
 @option options [String] :name - The name of the WAMP Client
 @option options [WampClient::Connection] :wamp - Allows a different WAMP to be passed in
 @option options [String] :uri The uri of the WAMP router to connect to
 @option options [String] :realm The realm to connect to
 @option options [String, nil] :protocol The protocol (default if wamp.2.json)
 @option options [String, nil] :authid The id to authenticate with
 @option options [Array, nil] :authmethods The different auth methods that the client supports
 @option options [Hash] :headers Custom headers to include during the connection
 @option options [WampClient::Serializer::Base] :serializer The serializer to use (default is json)
 Opens the connection