how to execute Socket.Select on more than the 64 default sockets number

  • Thread starter Thread starter osaleh
  • Start date Start date
O

osaleh

I am trying to execute a Socket.Select() statement on an
arraylist of sockets. The problem is that I can only go up
to 64 sockets at a time. I know that I have to manupilate
the FD_SetSize to increase the limit. How do you do that
in C# in the .NET Visual Studio environmrnt.
 
I am trying to execute a Socket.Select() statement on an
arraylist of sockets. The problem is that I can only go up
to 64 sockets at a time. I know that I have to manupilate
the FD_SetSize to increase the limit. How do you do that
in C# in the .NET Visual Studio environmrnt.

Osaleh -

This is a Win32 API hack. As far as I know there is no way around
the 64 socket limitation in .NET. Maybe someone with inside
information can share if there is a trick to getting this to work in
..NET.

You may need to redesign your app to use either asynchronous
sockets or separate threads for each client. Either of these methods
can be scaled to support quite a few users, depending on your PC size.
Good luck with your network app.

Rich Blum - Author
"C# Network Programming" (Sybex)
http://www.sybex.com/sybexbooks.nsf/Booklist/4176
"Network Performance Open Source Toolkit" (Wiley)
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0471433012.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top