cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
user name:
password:
Forgot your password?
please wait
try again
cancel
forgot your password?
sign up
log in
[Legacy version]
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Windows Programming
How can I make recv not wait until data
How can I make recv not wait until data is sent
Apr 23, 2011 at 4:59pm
Apr 23, 2011 at 4:59pm UTC
failbit
(7)
Is possible to force recv not to wait until data is sent, but instead check if there is any data to receive and if any data is available it will receive it?
Apr 25, 2011 at 2:12pm
Apr 25, 2011 at 2:12pm UTC
kooth
(746)
Yes. Read up on poll() and select().
Apr 25, 2011 at 3:24pm
Apr 25, 2011 at 3:24pm UTC
Computergeek01
(5613)
I would suggest also using "WaitForInputIdle(...)" with "poll()" and\or "select()" so that you don't spike your CPU with a needless loop. See Here:
http://msdn.microsoft.com/en-us/library/ms687022(VS.85).aspx
Apr 28, 2011 at 10:27am
Apr 28, 2011 at 10:27am UTC
kbw
(9488)
http://www.winsocketdotnetworkprogramming.com/winsock2programming/winsock2advancedcode1f.html
Topic archived. No new replies allowed.