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

Method destroy

packages/socket.io/lib/client.ts:345–356  ·  view source on GitHub ↗

* Cleans up event listeners. * @private

()

Source from the content-addressed store, hash-verified

343 * @private
344 */
345 private destroy(): void {
346 this.conn.removeListener("data", this.ondata);
347 this.conn.removeListener("error", this.onerror);
348 this.conn.removeListener("close", this.onclose);
349 // @ts-ignore
350 this.decoder.removeListener("decoded", this.ondecoded);
351
352 if (this.connectTimeout) {
353 clearTimeout(this.connectTimeout);
354 this.connectTimeout = undefined;
355 }
356 }
357}

Callers 5

oncloseMethod · 0.95
endMethod · 0.45
abortUpgradeFunction · 0.45
doCloseMethod · 0.45
destroyReadStreamFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected