Results 1 to 4 of 4
Hey there,
I have a problem with select() that I would really appreciate if you guys help me out with!
here is some of my code:
Code:
CODE DELETED
the ...
- 11-21-2009 #1Just Joined!
- Join Date
- May 2009
- Posts
- 35
problem with select()!!!
Hey there,
I have a problem with select() that I would really appreciate if you guys help me out with!
here is some of my code:
the problem is, select() times out ALWAYS after the specified time, even when the client is receiving data from the server, I tired everything, spent the last few hours just messing around with the code and reading about select() but to no availCode:CODE DELETED

anyone has any ideas whats the problem?
thank u in advance
- 11-22-2009 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
You have to cancel the timer if select() has triggered but not timed out, and then reset it after the recv() call.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 11-22-2009 #3Just Joined!
- Join Date
- May 2009
- Posts
- 35
can you elaborate on that, what do u mean by cancel my timer, do u mean I need to reinitialize my timeval?
EDIT: OFCOURSE, its so simple, how i didnt think of that, so many hours wasted trying to search for what i did wrong, arghhhhhhh, oh well atleast now i fully understand select() since i read its manual like 100000 times, thanks alot dude, really thanks
- 11-22-2009 #4Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
Yeah. It's the 100001st time whacking oneself on the head that stuff sticks...
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote
