-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add example for sending pre-serialized messages #429
Comments
At least the server side of this example looks pretty straightforward to carry over to grpc-kotlin, presuming knowledge of ServerCalls, generated Kotlin service stubs, and the original Java example. |
Maybe @lowasser can point us in the right direction. |
The more general parts of the server code could look as below:
I've ended up using custom code for my own limited needs instead of the general |
grpc-java 1.58.0 added a documentation example1 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 samebyte[]
.)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 request2.
Footnotes
https://github.com/grpc/grpc-java/blob/master/examples/src/main/java/io/grpc/examples/preserialized/PreSerializedServer.java ↩
https://github.com/grpc/grpc-java/issues/9707 ↩
The text was updated successfully, but these errors were encountered: