grpc-kotlin icon indicating copy to clipboard operation
grpc-kotlin copied to clipboard

Add example for sending pre-serialized messages

Open bubenheimer opened this issue 1 year ago • 3 comments

grpc-java 1.58.0 added a documentation example[^1] for how to transparently construct and send a response message with a pre-serialized byte[] (ByteArray) payload. (Without deserializing to the corresponding protobuf type first, then serializing again to the same byte[].) [^1]: https://github.com/grpc/grpc-java/blob/master/examples/src/main/java/io/grpc/examples/preserialized/PreSerializedServer.java

I am looking for an equivalent example for grpc-kotlin, like via io.grpc.kotlin.ServerCalls, I imagine someone may have done this already.

I'd like to use this on the server for a response from a bidi service, in essentially the same scenario as in the original grpc-java request[^2]. [^2]: https://github.com/grpc/grpc-java/issues/9707

bubenheimer avatar Sep 08 '23 15:09 bubenheimer