Cygwin select + sockets from DLL

Peter Hudson +44 1892 541 720 peter@telnet-research.co.uk
Fri Nov 19 04:23:00 GMT 1999


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@sourceware.cygnus.com



More information about the Cygwin mailing list