src/danmu/bilibilitcp.js
/**
         * Resets all fields for new connection, terminate current connection
         */
Resets all fields for new connection, terminate current connection
Resets all fields for new connection terminate current connection
reset() {
            this.heartbeatTask && clearInterval(this.heartbeatTask);
            this.heartbeatTask = null;
            this.healthCheck && clearInterval(this.healthCheck);
            this.healthCheck = null;
            (this.socket 
                && this.socket.unref().end().destroy() 
                && (this.socket = null));
            this.buffer = Buffer.alloc(0);
            this.totalLength = -1;
        }
reset ( ) { this . heartbeatTask && clearInterval ( this . heartbeatTask ) ; this . heartbeatTask = null ; this . healthCheck && clearInterval ( this . healthCheck ) ; this . healthCheck = null ; ( this . socket && this . socket . unref ( ) . end ( ) . destroy ( ) && ( this . socket = null ) ) ; this . buffer = Buffer . alloc ( 0 ) ; this . totalLength = - 1 ; }
Resets all fields for new connection, terminate current connection
Resets all fields for new connection terminate current connection