MCPcopy Index your code
hub / github.com/socketio/socket.io / send

Method send

lib/socket.ts:508–511  ·  view source on GitHub ↗

* Sends a `message` event. * * This method mimics the WebSocket.send() method. * * @see https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/send * * @example * io.on("connection", (socket) => { * socket.send("hello"); * * // this is equivalent to * socke

(...args: EventParams<EmitEvents, "message">)

Source from the content-addressed store, hash-verified

506 * @return self
507 */
508 public send(...args: EventParams<EmitEvents, "message">): this {
509 this.emit("message", ...args);
510 return this;
511 }
512
513 /**
514 * Sends a `message` event. Alias of {@link send}.

Callers

nothing calls this directly

Calls 1

emitMethod · 0.95

Tested by

no test coverage detected