Quote Originally Posted by nvoigt View Post
If it's actually in the seconds-range, maybe writing logs or debugging will help. Find out what happens in the time of the delay. How do you know when to call your receive function by the way? Is that some sort of timer or just an endless loop?
its in an endless loop, here is the loop, this loop resides in the main function, the previous lines before it just instantiate the class and its attributes, here is the code:
Client Queue is a list object that holds the connections
Code:
while (true)
                {
                    server.checkForDisconnections(server.ClientQueue);
                    server.checkForMessages(server.ClientQueue);
                    server.PollResult = server.IncomingConnection.Poll(100000, SelectMode.SelectRead);
                    if (server.PollResult)
                    {
                        server.AcceptedConnection = server.IncomingConnection.Accept();
                        server.ClientQueue.Add(server.AcceptedConnection);
                        Console.WriteLine("A client has connected");
                    }

                }