delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/11/19/08:31:07

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com>
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
Message-ID: <19991119132849.24917.rocketmail@web111.yahoomail.com>
Date: Fri, 19 Nov 1999 05:28:49 -0800 (PST)
From: Earnie Boyd <earnie_boyd AT yahoo DOT com>
Reply-To: earnie_boyd AT yahoo DOT com
Subject: Re: Cygwin select + sockets from DLL
To: Peter Hudson +44 1892 541 720 <peter AT telnet-research DOT co DOT uk>,
cygwin AT sourceware DOT cygnus DOT com
MIME-Version: 1.0

--- Peter Hudson +44 1892 541 720 <peter AT telnet-research DOT co DOT uk> 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 <mailto:earnie_boyd AT yahoo DOT com>
Cygwin Newbies, please visit
<http://www.freeyellow.com/members5/gw32/index.html>
__________________________________________________
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

- Raw text -


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