//Takes stuff of inQ and sends it to where it should go.
 private void recieveStuff()
 {
     while (running)
     {
         Envelope recieved = recieve();
         inQ.Enqueue(recieved);
         inQ.setQueueSignal();
     }
 }
Beispiel #2
0
 public void recieveStuff()
 {
     while (running)
     {
         foreach (KeyValuePair <IPEndPoint, TcpClient> client in tcpClients)
         {
             Envelope env = recieve(client.Key);
             if (env != null)
             {
                 inQ.Enqueue(env);
                 inQ.setQueueSignal();
             }
         }
         Thread.Sleep(300); //Take a 200ms snoozer. //Not sure how to add a event for this.
     }
 }