MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / ServeDirect

Function ServeDirect

rpc/serve.go:29–36  ·  view source on GitHub ↗

ServeDirect serves data stream directly.

(
	ctx context.Context, server *rpc.Server, stream io.ReadWriteCloser, remote *proto.RawNodeID,
)

Source from the content-addressed store, hash-verified

27
28// ServeDirect serves data stream directly.
29func ServeDirect(
30 ctx context.Context, server *rpc.Server, stream io.ReadWriteCloser, remote *proto.RawNodeID,
31) {
32 subctx, cancelFunc := context.WithCancel(ctx)
33 defer cancelFunc()
34 nodeAwareCodec := NewNodeAwareServerCodec(subctx, utils.GetMsgPackServerCodec(stream), remote)
35 server.ServeCodec(nodeAwareCodec)
36}

Callers

nothing calls this directly

Calls 2

GetMsgPackServerCodecFunction · 0.92
NewNodeAwareServerCodecFunction · 0.85

Tested by

no test coverage detected