MCPcopy Create free account
hub / github.com/socketio/socket.io / destroy

Method destroy

lib/client.ts:339–350  ·  view source on GitHub ↗

* Cleans up event listeners. * @private

()

Source from the content-addressed store, hash-verified

337 * @private
338 */
339 private destroy(): void {
340 this.conn.removeListener("data", this.ondata);
341 this.conn.removeListener("error", this.onerror);
342 this.conn.removeListener("close", this.onclose);
343 // @ts-ignore
344 this.decoder.removeListener("decoded", this.ondecoded);
345
346 if (this.connectTimeout) {
347 clearTimeout(this.connectTimeout);
348 this.connectTimeout = undefined;
349 }
350 }
351}

Callers 2

oncloseMethod · 0.95
destroyReadStreamFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected