Re: how to avoid recv() blocking issue?

Tech-Archive recommends: Fix windows errors by optimizing your registry



Obviously you have to set non-blocked mode first. How to do it you can find
in my first answer to you, go to the beginning of your thread
Arkady

"Alexander Cherny" <black@xxxxxxxxxxxxxxx> wrote in message
news:OYlp3j1AHHA.4212@xxxxxxxxxxxxxxxxxxxxxxx
if i call recv() in a blocking mode, i can't check anything (in this
thread) until recv() returns, can i? and recv() does not return anything
until any data is received. how can i handle this? only calling recv() in
a non-blocking mode. but how? this is the question.

--
alex c.

"Arkady Frenkel" <arkadyf@xxxxxxxxxxxxxxxx> wrote in message
news:ebWXnF1AHHA.4992@xxxxxxxxxxxxxxxxxxxxxxx
Or call it and check that you have data or WSAWOULDBLOCK which isn't
really error but warning that data will be some time, so you'll need to
return later, or use select() to check if data come and call recv() in
advance
Arkady

"Alexander Cherny" <black@xxxxxxxxxxxxxxx> wrote in message
news:u3X5Qz0AHHA.5068@xxxxxxxxxxxxxxxxxxxxxxx
ok. but how to call recv(), not putting it in a blocking state? because,
if it's in a blocking state, i'm gonna wait for its return too long :).




.