How can the C++ server detect the compression algorithm of the client (request)?
There are two contexts: `grpc::ServerContext` and `grpc::ClientContext`. Each context has methods: `compression_algorithm` (getter) and `set_compression_algorithm`. If the client sets algo by `set_compression_algorithm` it used to compress requests. If the server sets algo by `set_compression_algorithm` it used to compress responses ([docs][1]). But how to check algo of the request on the server side? `set_compression_algorithm` [adds metadata][2] in the header `grpc-internal-encoding-request`. But it is a internal metadata and this is not available in `grpc::ServerContext::client_metadata` Generally, I want to get compress algo of a client on the server side and set the same algo for responses. [1]: https://grpc.github.io/grpc/cpp/classgrpc_1_1_server_context.html#a79723d2154ae4a48da5bef8daf41a3e7 [2]: https://github.com/grpc/grpc/blob/2f8af1b7f2ac17793e01bec1b2654ca12ed21966/src/cpp/client/client_context.cc#L150 -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/grpc-io/9e160bbc-2261-42a1-8add-66359d7c550fn%40googlegroups.com.
