This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
select() returns 0 (NT4.0)
- To: gnu-win32 at cygnus dot com
- Subject: select() returns 0 (NT4.0)
- From: Matthias Weng <weng at tp-cad dot com>
- Date: Mon, 05 Oct 1998 14:31:58 +0000
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".