function () {
        // Ensure that there is no open WebSocket from a previous Connection.
        this._closeSocket();

        // Create the new WobSocket
        this.socket = new WebSocket(this._conn.service, "xmpp");
        this.socket.onopen = this._onOpen.bind(this);
        this.socket.onerror = this._onError.bind(this);
        this.socket.onclose = this._onClose.bind(this);
        this.socket.onmessage = this._connect_cb_wrapper.bind(this);
    }
function () {
        // Ensure that there is no open WebSocket from a previous Connection.
        this._closeSocket();

        // Create the new WobSocket
        this.socket = new WebSocket(this._conn.service, "xmpp");
        this.socket.onopen = this._onOpen.bind(this);
        this.socket.onerror = this._onError.bind(this);
        this.socket.onclose = this._onClose.bind(this);
        this.socket.onmessage = this._connect_cb_wrapper.bind(this);
    }
function ( ) { // Ensure that there is no open WebSocket from a previous Connection.
 this . _closeSocket ( ) ; // Create the new WobSocket
 this . socket = new WebSocket ( this . _conn . service , "xmpp" ) ; this . socket . onopen = this . _onOpen . bind ( this ) ; this . socket . onerror = this . _onError . bind ( this ) ; this . socket . onclose = this . _onClose . bind ( this ) ; this . socket . onmessage = this . _connect_cb_wrapper . bind ( this ) ; }
PrivateFunction: _connect
_Private_ function called by Strophe.Connection.connect

Creates a WebSocket for a connection and assigns Callbacks to it.
Does nothing if there already is a WebSocket.
PrivateFunction : _connect _Private_ function called by Strophe . Connection . connect
Called when the connection is established