MCPcopy
hub / github.com/socketio/socket.io / onclose

Method onclose

packages/socket.io-client/lib/socket.ts:662–671  ·  view source on GitHub ↗

* Called upon engine `close`. * * @param reason * @param description * @private

(
    reason: Socket.DisconnectReason,
    description?: DisconnectDescription,
  )

Source from the content-addressed store, hash-verified

660 * @private
661 */
662 private onclose(
663 reason: Socket.DisconnectReason,
664 description?: DisconnectDescription,
665 ): void {
666 debug("close (%s)", reason);
667 this.connected = false;
668 delete this.id;
669 this.emitReserved("disconnect", reason, description);
670 this._clearAcks();
671 }
672
673 /**
674 * Clears the acknowledgement handlers upon disconnection, since the client will never receive an acknowledgement from

Callers 2

ondisconnectMethod · 0.95
disconnectMethod · 0.95

Calls 2

_clearAcksMethod · 0.95
debugFunction · 0.85

Tested by

no test coverage detected