static void Main(string[] args)
        {
            ContractClient client = new ContractClient(new InstanceContext(new CallbackHandler()));

            //Console.WriteLine("Connected");
            //Console.WriteLine(client.ServiceMethodAdd(22, 33));
            client.Connect("Grisha");
            client.Connect("Kolya");
            client.Connect("Olya");
            client.SendMess("Hello", 1);
            //client.Disconnect(2);
            client.SendMess("Hello", 2);
            client.SendMess("Hello", 3);
            //client.Disconnect(1);
            client.SendMess("Hello", 1);
            //client.Disconnect(3);

            Console.ReadLine();
        }
Exemple #2
0
 void ConnectUser()
 {
     if (!isConnected)
     {
         client = new ContractClient(new InstanceContext(this));
         btConDiscon.Content  = "Disconnect";
         isConnected          = true;
         tbUserName.IsEnabled = false;
         id = client.Connect(tbUserName.Text);
     }
 }