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

Method #send

examples/basic-websocket-client/src/index.js:189–193  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

187 }
188
189 #send(data) {
190 if (this.#ws.readyState === WebSocket.OPEN) {
191 this.#ws.send(data);
192 }
193 }
194
195 #sendPacket(packet) {
196 this.#send(EIOPacketType.MESSAGE + encode(packet));

Callers 2

#onMessageMethod · 0.95
#sendPacketMethod · 0.95

Calls 1

sendMethod · 0.45

Tested by

no test coverage detected