Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: <19991119132849.24917.rocketmail@web111.yahoomail.com> Date: Fri, 19 Nov 1999 05:28:49 -0800 (PST) From: Earnie Boyd Reply-To: earnie_boyd AT yahoo DOT com Subject: Re: Cygwin select + sockets from DLL To: Peter Hudson +44 1892 541 720 , cygwin AT sourceware DOT cygnus DOT com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii --- Peter Hudson +44 1892 541 720 wrote: > Hello > > I am trying to use a B20.1 select call to wait for a read event > on a socket, but the select never returns. This socket was created > by a DLL that is not mine. > > The socket has a file descriptor value of a number greater than 63. > Hence when a use FD_SET to create the read mask for the select, > there aren't enough bits in the mask. The mask just remains as 0,0 , > which is why the select doesn't return. > > In sys/types.h I can see: > # define FD_SETSIZE 64 > > which is why my file descriptor values do not fit in an fd_mask. > > I can also see the comment in this file: > "We don't define fd_set and friends if we are compiling POSIX > source, or if we have included the Windows Sockets.h header (which > defines Windows versions of them). Note that a program which > includes the Windows sockets.h header must know what it is doing; > it must not call the cygwin32 select function." > > I am not including the Windows sockets.h header, nor does the > header file for the DLL include it. But presumably the DLL does > use winsock-allocated sockets. Do I gather that I can't use these > sockets with Cygwin select? > > I am doing something wrong, or is there a way round this problem? > Well, unless the third party software uses cygwin1.dll (which I doubt), then based up the quoted comments you can't use the Cygwin select. You must use the Windows sockets.h header and function set. ===== Earnie Boyd Cygwin Newbies, please visit __________________________________________________ Do You Yahoo!? Bid and sell for free at http://auctions.yahoo.com -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com