Subject: select() returns 0 (NT4.0)
From: [email-masked] (Matthias Weng)

5 Oct 1998 15:48:18 -0700
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: [email-masked]

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
"[email-masked]" with one line of text: "help".