onopen() {
        debug("open");
        // clear old subs
        this.cleanup();
        // mark as open
        this._readyState = "open";
        super.emit("open");
        // add new subs
        const socket = this.engine;
        this.subs.push(on_1.on(socket, "ping", this.onping.bind(this)), on_1.on(socket, "data", this.ondata.bind(this)), on_1.on(socket, "error", this.onerror.bind(this)), on_1.on(socket, "close", this.onclose.bind(this)), on_1.on(this.decoder, "decoded", this.ondecoded.bind(this)));
    }
/**
     * Called upon transport open.
     *
     * @private
     */
Called upon transport open.
@private
Called upon transport open . @private
onopen() {
        debug("open");
        this.cleanup();
        this._readyState = "open";
        super.emit("open");
        const socket = this.engine;
        this.subs.push(on_1.on(socket, "ping", this.onping.bind(this)), on_1.on(socket, "data", this.ondata.bind(this)), on_1.on(socket, "error", this.onerror.bind(this)), on_1.on(socket, "close", this.onclose.bind(this)), on_1.on(this.decoder, "decoded", this.ondecoded.bind(this)));
    }
onopen ( ) { debug ( "open" ) ; this . cleanup ( ) ; this . _readyState = "open" ; super . emit ( "open" ) ; const socket = this . engine ; this . subs . push ( on_1 . on ( socket , "ping" , this . onping . bind ( this ) ) , on_1 . on ( socket , "data" , this . ondata . bind ( this ) ) , on_1 . on ( socket , "error" , this . onerror . bind ( this ) ) , on_1 . on ( socket , "close" , this . onclose . bind ( this ) ) , on_1 . on ( this . decoder , "decoded" , this . ondecoded . bind ( this ) ) ) ; }
Called upon transport open.
Called upon transport open .
// clear old subs // mark as open // add new subs