More than 64 sockets ?
Mon Dec 6 13:46:00 GMT 1999
On Mon, Dec 06, 1999 at 09:54:39AM -0600, Mumit Khan wrote:
>stefan <firstname.lastname@example.org> writes:
>> we were porting a server software to Win9x/NT and had to notice that you
>> cannot accept() more than 64 sockets. Why is this ? Can anyone help us ?
>The underlying OS API, WaitForMultipleObjects, has a limit of 64 handles
>it can wait on, and that's probably the reason. There are tricks to get
>around it, but it requires creating multiple threads. Not pretty.
This isn't a problem with cygwin. Cygwin uses the Winsock select() for
sockets. There probably is a limit there but it's not 64.
64 is just a hard-coded limit. Recent snapshots should allow more than
this. You have to set FD_SETSIZE to some other number. Take a look at
>Go to the MSDN docs on www.microsoft.com and search for 64 *and* Wait
>and see if it turns up; also, search comp.os.ms-windows.programmer.win32
>on www.deja.com, where this is usually beated to death. Look for the
>article by Richter that shows the multiple thread implementation, where
>each new thread is started to handle the extra batches of 64 handles to
>wait for -- this is something Cygwin should implement (uh oh, do I hear
>the "feel free to submit patches" response ;-).
I don't think we really need this. Most of the interesting fds are
already handled in separate threads.
Want to unsubscribe from this list?
Send a message to email@example.com
More information about the Cygwin