Commit e7c2b73
committed
Implement GenericByteStreamMethodHandler and CodecMessageStreamHandler adapter
This commit introduces the `GenericByteStreamMethodHandler` trait to provide a standard interface for handling raw gRPC byte streams (`ReqB: Buf`).
Additionally, it adds the `CodecMessageStreamHandler`, which bridges the gap between raw byte streams and strongly-typed gRPC messages. It acts as an adapter that wraps an underlying `MessageStreamHandler` and implements `GenericByteStreamMethodHandler`, transparently managing the encoding and decoding of message streams using standard Codecs.
Finally, the `method_handler` module is updated to export these new components and introduces a `CodecRespB` type alias for the default codec response body type.1 parent 88bfd31 commit e7c2b73
3 files changed
Lines changed: 545 additions & 0 deletions
File tree
- grpc/src/server
- method_handler
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
| |||
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
0 commit comments