grpcgrpc-dotnet

How does one configure KeepAlive on Grpc.AspNetCore.Client?


I'm trying to configure the KeepAlive settings for a gRPC connection using Grpc.Net.Client. The original SDK supports this through injecting ChannelOption objects into the Channel constructor. What I can't see is any way to set this up through the new .NET Core 3.1 API. Is this possible?


Solution

  • Unfortunately the Grpc.Net.Client does not currently provide configurable keepalive support (it requires feature support from the underlying HttpClient) This might be available in the future, see https://github.com/dotnet/corefx/issues/41852 for details.