Files
Swarm/DysonNetwork.Shared/Proto/GrpcClientHelper.cs
2025-09-27 14:09:28 +08:00

16 lines
435 B
C#

using Grpc.Net.Client;
using Grpc.Core;
namespace DysonNetwork.Shared.Proto;
public static class GrpcClientHelper
{
public static CallInvoker CreateCallInvoker(string url)
{
return GrpcChannel.ForAddress(url, new GrpcChannelOptions
{
HttpHandler = new HttpClientHandler()
{ ServerCertificateCustomValidationCallback = (_, _, _, _) => true },
}).CreateCallInvoker();
}
}