         # also allowed to be), then use the default protocol, which is
         # 'ws'
         protocol = if host.protocol is 'wss' then 'wss' else @DEFAULT_PROTOCOL
+
+        ping_interval = host.ping_interval or @DEFAULT_PING_INTERVAL
 
         # Next we construct an XHR with the path to the reql query
         # endpoint on the http server.

                        # just giving it as a callback directly so
                        # that it gets bound to the correct
                        # `this`.
                        @socket.onmessage = (e) => @_data(new Buffer(new Uint8Array(e.data)))

                        # Notify listeners we've connected
                        # successfully. Notably, the Connection

    # one.
    DEFAULT_PROTOCOL: 'ws'


    # We define the default ping interval in case the user doesn't specify one.
    DEFAULT_PING_INTERVAL: 37*1000

    # A static method used by `r.connect` to decide which kind of
    # connection to create in a given environment. Here we check if
    # XHRs are defined. If not, we aren't in the browser and shouldn't
