Tinyden
Tinyden

Reputation: 574

gRPC timeout on server side

I'm working on bidirectional stream gRPC in C++. I want to set a timeout limit on server side, and kill the connection if it exceeds a threshold.

But the only timeout mechanism I've found is on client side(https://grpc.io/blog/deadlines/#c). And I don't find any API possible to for ServerContext(https://grpc.github.io/grpc/cpp/classgrpc_1_1_server_context.html). Does someone know how to do that?

Upvotes: 0

Views: 2199

Answers (1)

Karthik Balaguru
Karthik Balaguru

Reputation: 7822

gRPC does not support server side timeout limit/setting and hence you might need to have your own implementation mechanism and update client using context.abort.

Upvotes: 1

Related Questions