ServeDirect serves data stream directly.
( ctx context.Context, server *rpc.Server, stream io.ReadWriteCloser, remote *proto.RawNodeID, )
| 27 | |
| 28 | // ServeDirect serves data stream directly. |
| 29 | func 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 | } |
nothing calls this directly
no test coverage detected