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

Method send

lib/index.ts:855–860  ·  view source on GitHub ↗

* Sends a `message` event to all clients. * * This method mimics the WebSocket.send() method. * * @see https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/send * * @example * io.send("hello"); * * // this is equivalent to * io.emit("message", "hello"); * *

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

Source from the content-addressed store, hash-verified

853 * @return self
854 */
855 public send(...args: EventParams<EmitEvents, "message">): this {
856 // This type-cast is needed because EmitEvents likely doesn't have `message` as a key.
857 // if you specify the EmitEvents, the type of args will be never.
858 this.sockets.emit("message" as any, ...args);
859 return this;
860 }
861
862 /**
863 * Sends a `message` event to all clients. Alias of {@link send}.

Callers 8

socket.tsFile · 0.45
eioPushFunction · 0.45
index.jsFile · 0.45
index.tsFile · 0.45
index.jsFile · 0.45
#sendMethod · 0.45
#mMethod · 0.45

Calls 1

emitMethod · 0.65

Tested by

no test coverage detected