コード例 #1
0
 public ServerExtraInfo(string serverId, string serverUrl,
                        AdvancedSlaveService.AdvancedSlaveServiceClient serverChannel)
 {
     ServerId      = serverId;
     ServerUrl     = serverUrl;
     ServerChannel = serverChannel;
 }
コード例 #2
0
        public void AddServer(string serverId, string url)
        {
            AppContext.SetSwitch("System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true);
            var channel = GrpcChannel.ForAddress(url);
            var client  = new AdvancedSlaveService.AdvancedSlaveServiceClient(channel);

            Servers.Add(new ServerExtraInfo(serverId, url, client));
        }