Ejemplo n.º 1
0
        public bool CreateClient()
        {
            bool ret = false;

            try
            {
                string channelInfo = $"{channelIP}:{channelPort}";

                grpcChannel = new Channel(channelInfo, ChannelCredentials.Insecure);

                grpcClient = new Post.PostClient(grpcChannel);

                ret = true;
            }
            catch (Exception ex)
            {
                Console.WriteLine($"{ex.Message}");

                SaveLog($"[Error] GRPCClient::CreateClient, Catch Error, Msg:{ex.Message}");
            }

            return(ret);
        }
Ejemplo n.º 2
0
 public PostClient()
 {
     client = new Post.PostClient(channel);
 }