Select() never timeouts
I got this code in my program. I expected the select to timeout but it never timeouts.
here it is. Can you please check if there is something wrong with the code Code:
int socket1 is a normal udp socket. and socket 2 is a raw socket. Are there any instances where I should set the socket as non-blocking before using select? |
Quote:
Code:
#include <sys/select.h> Quote:
Why are you using a raw socket (and what flavor, tcp or udp)?? |
Oooppss my bad. After checking all the variables included, I found out that the value of timeout was actually 2000 (I actually modified posted code the number 2 was actually a defined value which was not updated on the server where I am compiling the change was only done on my local computer :) I guess I should diff every files before compiling to check for inconsistencies.
As for the raw socket it is actually an ICMP socket. I will be sending some icmp requests. Thank you |
All times are GMT -5. The time now is 08:18 AM. |