Snai.GrpcClient/MsgServiceClient.cs
(完整代码) 736Busing Grpc.Core;
using Snai.GrpcService.Protocol;
using System;
using System.Collections.Generic;
using System.Text;
namespace Snai.GrpcClient
{
public static class MsgServiceClient
{
private static Channel _channel;
private static MsgService.MsgServiceClient _client;
static MsgServiceClient()
{
_channel = new Channel("127.0.0.1:40001", ChannelCredentials.Insecure);
_client = new MsgService.MsgServiceClient(_channel);
}
public static GetMsgSumReply GetSum(int num1, int num2)
{
return _client.GetSum(new GetMsgNumRequest
{
Num1 = num1,
Num2 = num2
});
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。