This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

select() returns 0 (NT4.0)


Hi there,
I'm using B19.1 under NT4.0. When I try to connect multiple clients to
one server- application via TCP/IP the server blocks in a REPEAT command
because select returns 0 though rhere is a client that wants to
communicate with the server. This happens though the bitmask for reading
contains a value different from zero.
Additional to that, each client after the second one who tries to get a
connection to the server is connected to the same socket as the second
client, so recv() tries to read from the second clients socket and
blocks until the second client does some action.
This application runs without problems under several unix systems since
many years.
Who can help me with this ??

-- Matthias Weng

 struct timeval nulltime;
 int     res, n, peer, user = null;
 fd_set  fd_var, fd_read, fd_write, fd_except;



   FD_ZERO(&fd_var);
   FD_ZERO(&fd_read);

  ... Initialization of fd_var ...


   REPEAT
    memcpy (&fd_read, &fd_var, sizeof (fd_read));
    FD_ZERO(&fd_write);
    FD_ZERO(&fd_except);

    /* hier werden die ports abgefragt, ob etwas vorhanden ist ! wb */

    memset (&nulltime, 0,sizeof(nulltime));
    res = select(sizeof(fd_var), &fd_read, &fd_write, &fd_except,
&nulltime);

   UNTIL (res);





-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]