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

Method emit

examples/basic-websocket-client/src/index.js:203–214  ·  view source on GitHub ↗
(...args)

Source from the content-addressed store, hash-verified

201 }
202
203 emit(...args) {
204 const packet = {
205 type: SIOPacketType.EVENT,
206 data: args,
207 };
208
209 if (this.connected) {
210 this.#sendPacket(packet);
211 } else {
212 this.#sendBuffer.push(packet);
213 }
214 }
215
216 disconnect() {
217 this.#shouldReconnect = false;

Callers

nothing calls this directly

Calls 1

#sendPacketMethod · 0.95

Tested by

no test coverage detected