Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Mon, 27 Mar 2006 07:57:31 +1000,    group: microsoft.public.platformsdk.networking        back       


socket.select() fails with > 64 sockets   
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.
date: Mon, 27 Mar 2006 07:57:31 +1000   author:   Michi Henning

Re: socket.select() fails with > 64 sockets   
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.
date: Mon, 27 Mar 2006 08:39:25 +0200   author:   Arkady Frenkel

Re: socket.select() fails with > 64 sockets   
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.
date: Tue, 28 Mar 2006 07:35:06 +1000   author:   Michi Henning

Re: socket.select() fails with > 64 sockets   
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.
date: Tue, 28 Mar 2006 08:31:07 +0200   author:   Arkady Frenkel

Re: socket.select() fails with > 64 sockets   
> 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.
date: Wed, 12 Apr 2006 14:15:56 +0200   author:   Michal Maryjanowski

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us