private void RpcSetIcpTempletFile() { string strConString; strConString = string.Format("{0}:{1}", ReadIniSettings.ReadIni.objIniValue.iniServer.Ip, ReadIniSettings.ReadIni.objIniValue.iniServer.Port); var channel = new Channel(strConString, ChannelCredentials.Insecure); var objclient = new RouteGuideClient(new RouteGuide.RouteGuideClient(channel)); objclient.SendTempletFile().Wait(); channel.ShutdownAsync().Wait(); rpcFileSize = objclient.RPC_FileSize; }
private void RpcRun() { string strConString; strConString = string.Format("{0}:{1}", ReadIniSettings.ReadIni.objIniValue.iniServer.Ip, ReadIniSettings.ReadIni.objIniValue.iniServer.Port); //var channel = new Channel("192.168.50.30:50051", ChannelCredentials.Insecure); var channel = new Channel(strConString, ChannelCredentials.Insecure); var objclient = new RouteGuideClient(new RouteGuide.RouteGuideClient(channel)); // Send and receive some notes. objclient.RouteChat().Wait(); channel.ShutdownAsync().Wait(); rpcMsg = objclient.RPC_Message; }