如何在 Grpc.AspNetCore.Client 上配置 KeepAlive?

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

我正在尝试配置 KeepAlive settings for a gRPC connection using Grpc.Net.Client. The original SDK 通过将 ChannelOption 对象注入 Channel 构造函数来支持此功能。我看不到有任何方法可以通过新的 .NET Core 3.1 API 进行设置。这可能吗?

遗憾的是Grpc.Net.Client目前不提供可配置的keepalive支持(它需要底层HttpClient的功能支持) 这可能在将来可用,请参阅 https://github.com/dotnet/corefx/issues/41852 了解详细信息。