MCPcopy
hub / github.com/socketio/socket.io / #onConnect

Method #onConnect

examples/basic-websocket-client/src/index.js:147–155  ·  view source on GitHub ↗
(packet)

Source from the content-addressed store, hash-verified

145 }
146
147 #onConnect(packet) {
148 this.id = packet.data.sid;
149 this.connected = true;
150
151 this.#sendBuffer.forEach((packet) => this.#sendPacket(packet));
152 this.#sendBuffer.slice(0);
153
154 super.emit("connect");
155 }
156
157 #onClose(reason) {
158 if (this.#ws) {

Callers 1

#onPacketMethod · 0.95

Calls 2

#sendPacketMethod · 0.95
emitMethod · 0.65

Tested by

no test coverage detected