Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Winsock select timeout problem

31 views
Skip to first unread message

Hammy

unread,
Jul 7, 2006, 4:39:51 PM7/7/06
to
HI

I ported my socket code from Linux to windows which uses a non blocking
TCP socket to concurrently check 5 nodes but am facing the following
problem

struct timeval time_out;
time_out.tv_sec = 0;
time_out.tv_usec = 0;

select(maxfd+1, &tset, &wset, NULL, &time_out);

where the second and the third arguments contain the read and write fds
with all the socket numbers with it and fourth argument is the timeout

now the problem is that the select function runs fine in Liunx and
returns the number of nodes that are alive but in windows it always
returns a timeout i.e. the value returned is always 0.

can anybody help me out with the reason for that e.g. is this a
firewall problem etc

thanks in advance

Hamid

Hammy

unread,
Jul 10, 2006, 11:13:31 AM7/10/06
to
the function donot even return any thing for the loop back address
127.0.0.1

please help me out !

thanks in advance

Hammy

unread,
Jul 16, 2006, 9:11:10 AM7/16/06
to
the code works fine for blocking sockets but it donot run for non
blocking and the select always returns zero

can somebody help me out about

thanks and best regards

0 new messages