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

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
Date: Fri, 19 Nov 99 12:22:39 GMT
From: peter AT telnet-research DOT co DOT uk (Peter Hudson +44 1892 541 720)
Message-Id: <9911191222.AA18268@telnet-research.co.uk>
To: cygwin AT sourceware DOT cygnus DOT com
Subject: Cygwin select + sockets from DLL

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?

Many thanks
Peter Hudson

Telnet Research Ltd

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