function (pres)
    {
        if (this.socket && this.socket.readyState !== WebSocket.CLOSED) {
            if (pres) {
                this._conn.send(pres);
            }
            var close = $build("close", { "xmlns": Strophe.NS.FRAMING, });
            this._conn.xmlOutput(close);
            var closeString = Strophe.serialize(close);
            this._conn.rawOutput(closeString);
            try {
                this.socket.send(closeString);
            } catch (e) {
                Strophe.info("Couldn't send <close /> tag.");
            }
        }
        this._conn._doDisconnect();
    }
function (pres)
    {
        if (this.socket && this.socket.readyState !== WebSocket.CLOSED) {
            if (pres) {
                this._conn.send(pres);
            }
            var close = $build("close", { "xmlns": Strophe.NS.FRAMING, });
            this._conn.xmlOutput(close);
            var closeString = Strophe.serialize(close);
            this._conn.rawOutput(closeString);
            try {
                this.socket.send(closeString);
            } catch (e) {
                Strophe.info("Couldn't send <close /> tag.");
            }
        }
        this._conn._doDisconnect();
    }
function ( pres ) { if ( this . socket && this . socket . readyState !== WebSocket . CLOSED ) { if ( pres ) { this . _conn . send ( pres ) ; } var close = $build ( "close" , { "xmlns" : Strophe . NS . FRAMING , } ) ; this . _conn . xmlOutput ( close ) ; var closeString = Strophe . serialize ( close ) ; this . _conn . rawOutput ( closeString ) ; try { this . socket . send ( closeString ) ; } catch ( e ) { Strophe . info ( "Couldn't send <close /> tag." ) ; } } this . _conn . _doDisconnect ( ) ; }
PrivateFunction: _disconnect
_Private_ function called by Strophe.Connection.disconnect

Disconnects and sends a last stanza if one is given

Parameters:
(Request) pres - This stanza will be sent before disconnecting.
PrivateFunction : _disconnect _Private_ function called by Strophe . Connection . disconnect
Send a close tag to the server