delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/12/06/16:46:53

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
From: Chris Faylor <cgf AT cygnus DOT com>
Date: Mon, 6 Dec 1999 16:17:28 -0500
To: Mumit Khan <khan AT NanoTech DOT Wisc DOT EDU>
Cc: stefan <stefan AT linux DOT f1 DOT fhtw-berlin DOT de>, cygwin AT sourceware DOT cygnus DOT com
Subject: Re: More than 64 sockets ?
Message-ID: <19991206161728.C2223@cygnus.com>
Mail-Followup-To: Mumit Khan <khan AT NanoTech DOT Wisc DOT EDU>,
stefan <stefan AT linux DOT f1 DOT fhtw-berlin DOT de>,
cygwin AT sourceware DOT cygnus DOT com
References: <Pine DOT LNX DOT 4 DOT 10 DOT 9912052255370 DOT 691-100000 AT bono DOT reversers DOT net> <199912061554 DOT JAA15146 AT hp2 DOT xraylith DOT wisc DOT edu>
Mime-Version: 1.0
X-Mailer: Mutt 1.0i
In-Reply-To: <199912061554.JAA15146@hp2.xraylith.wisc.edu>; from khan@NanoTech.Wisc.EDU on Mon, Dec 06, 1999 at 09:54:39AM -0600

On Mon, Dec 06, 1999 at 09:54:39AM -0600, Mumit Khan wrote:
>stefan <stefan AT linux DOT f1 DOT fhtw-berlin DOT de> writes:
>> Hello,
>> 
>> 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
winsock.h.

>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.

cgf

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019