MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / send

Function send

projects/runtime-node/src/server.ts:82–90  ·  view source on GitHub ↗
(message)

Source from the content-addressed store, hash-verified

80 clientRequestPrincipal: clientRequestPrincipalFromRequest(request),
81 },
82 send(message) {
83 if (socket.readyState !== WebSocket.OPEN) return
84 if (socket.bufferedAmount > maxBufferedBytes) {
85 socket.close(1013, "client is too far behind")
86 runtime.notify("connection/lagged", { connectionId, bufferedAmount: socket.bufferedAmount })
87 return
88 }
89 socket.send(JSON.stringify(message))
90 },
91 close() {
92 socket.close()
93 },

Callers

nothing calls this directly

Calls 3

notifyMethod · 0.80
closeMethod · 0.65
sendMethod · 0.65

Tested by

no test coverage detected