[Mono-list] TCPListener problem

Gonzalo Paniagua Javier gonzalo at novell.com
Wed Jun 21 04:37:55 EDT 2006


On Tue, 2006-06-20 at 19:23 -0400, Lee wrote:
[...]
>         while (true)
>         {
>           // check to see if request is pending
>           if (SockServer.Pending())
>           {
>             TcpClient client = SockServer.AcceptTcpClient();
[...]
Btw, that will be a very busy loop. It will be calling
TcpListener.Pending(), which does a socket.Select (or similar) with a 0
timeout. Don't you end up using all the CPU on windows?

-Gonzalo



More information about the Mono-list mailing list