We have a server that monitors a number of file descriptors using Socket.Select() (.NET 1.1). It works fine until the number of descriptors reaches 65, at which point the call bombs with an "index out of range" exception. The bottom of the stack trace looks something like: System.IndexOutOfRangeException: Az index a tmb hatrain kvlre mutatott. at System.Net.Sockets.Socket.SocketListToFileDescript orSet(IList socketList) at System.Net.Sockets.Socket.Select(IList checkRead, IList checkWrite, IList checkError, Int32 microSeconds) It very much looks like .NET 1.1 is subject to the platform SDK FD_SETSIZE limit of 64. The documentation doesn't mention anything about a limit or changing it. Does anyone know whether it's possible to increase the limit? Cheers, Michi.
No, you have to use multiple threads to over the problem. Look at http://www.tangentsoft.net/wskfaq/advanced.html#64sockets Arkady "Michi Henning" wrote in message news:44270E4B.5080609@zeroc.com... > We have a server that monitors a number of file descriptors using > Socket.Select() (.NET 1.1). It works fine until the number of > descriptors reaches 65, at which point the call bombs with an > "index out of range" exception. The bottom of the stack trace > looks something like: > > System.IndexOutOfRangeException: Az index a tmb hatrain kvlre > mutatott. at > System.Net.Sockets.Socket.SocketListToFileDescript orSet(IList socketList) > at System.Net.Sockets.Socket.Select(IList checkRead, IList checkWrite, > IList checkError, Int32 microSeconds) > > It very much looks like .NET 1.1 is subject to the platform SDK > FD_SETSIZE limit of 64. > > The documentation doesn't mention anything about a limit or changing it. > Does anyone know whether it's possible to increase the limit? > > Cheers, > > Michi.
Arkady Frenkel wrote: > No, you have to use multiple threads to over the problem. Look at > http://www.tangentsoft.net/wskfaq/advanced.html#64sockets > Arkady Thanks for the link. Yes, that option occurred to me too, but it's a fair bit of work. Apparently, .NET 2.0 gets it right, so that may be the lower-friction path. Cheers, Michi.
That mean that .Net 2 did that multithreading for your :) Arkady "Michi Henning" wrote in message news:eFHFSZeUGHA.4740@TK2MSFTNGP14.phx.gbl... > Arkady Frenkel wrote: >> No, you have to use multiple threads to over the problem. Look at >> http://www.tangentsoft.net/wskfaq/advanced.html#64sockets >> Arkady > > Thanks for the link. Yes, that option occurred to me too, but > it's a fair bit of work. Apparently, .NET 2.0 gets it right, > so that may be the lower-friction path. > > Cheers, > > Michi.
> It very much looks like .NET 1.1 is subject to the platform SDK > FD_SETSIZE limit of 64. > > The documentation doesn't mention anything about a limit or changing it. > Does anyone know whether it's possible to increase the limit? I think that you can change it at the point of compiling the code that uses platform SDK, here it's .NET 1.1 runtime. It can be done only by Microsoft. I suppose, that in .NET 2.0 runtime the FD_SETSIZE was changed to a higher value.