MCPcopy Create free account
hub / github.com/middleapi/orpc / constructor

Method constructor

packages/standard-server-peer/src/server.ts:30–37  ·  view source on GitHub ↗
(
    send: EncodedMessageSendFn,
  )

Source from the content-addressed store, hash-verified

28 private readonly peer: experimental_ServerPeerWithoutCodec
29
30 constructor(
31 send: EncodedMessageSendFn,
32 ) {
33 // eslint-disable-next-line new-cap
34 this.peer = new experimental_ServerPeerWithoutCodec(async ([id, type, payload]) => {
35 await send(await encodeResponseMessage(id, type, payload))
36 })
37 }
38
39 get length(): number {
40 return this.peer.length

Callers

nothing calls this directly

Calls 2

encodeResponseMessageFunction · 0.90
sendFunction · 0.85

Tested by

no test coverage detected