Exemplo n.º 1
0
 public static void Pump(Socket s1, Socket s2)
 {
     var wh = new ManualResetEvent(false);
     var p1 = new SinglePump(s1, s2, wh);
     var p2 = new SinglePump(s2, s1, wh);
     p1.Pump();
     p2.Pump();
     while (s1.Connected && s2.Connected && !p1.finished && !p2.finished)
     {
         wh.WaitOne(10000);
     }
 }
Exemplo n.º 2
0
        public static void Pump(Socket s1, Socket s2)
        {
            var wh = new ManualResetEvent(false);
            var p1 = new SinglePump(s1, s2, wh);
            var p2 = new SinglePump(s2, s1, wh);

            p1.Pump();
            p2.Pump();
            while (s1.Connected && s2.Connected && !p1.finished && !p2.finished)
            {
                wh.WaitOne(10000);
            }
        }