Пример #1
0
        public void Main1()
        {
            Uri              tcpUri  = new Uri("http://localhost:1050/TestService");
            EndpointAddress  address = new EndpointAddress(tcpUri);
            BasicHttpBinding binding = new BasicHttpBinding();
            ChannelFactory <IServerContract> factory = new ChannelFactory <IServerContract>(binding, address);
            IServerContract service = factory.CreateChannel();

            for (int i = 0; i < iter_num; i++)
            {
                service.Get(diff);
            }
            //List<int> a3 = service.Get(diff); foreach (int b in a3) Console.Write(b + " ");
        }
Пример #2
0
        public void Main1()
        {
            Uri              tcpUri  = new Uri("http://localhost:1050/TestService");
            EndpointAddress  address = new EndpointAddress(tcpUri);
            BasicHttpBinding binding = new BasicHttpBinding();
            ChannelFactory <IServerContract> factory = new ChannelFactory <IServerContract>(binding, address);
            IServerContract service = factory.CreateChannel();

            for (int i = 0; i < iter_num; i++)
            {
                service.Get(diff);
                service.Want_Me();
            }
            Console.WriteLine("Количесвто увиденных запросов сервером: " + service.Client_Num());
            //List<int> a3 = service.Get(diff); foreach (int b in a3) Console.Write(b + " ");
        }