how to avoid recv() blocking issue?
- From: "Alexander Cherny" <black@xxxxxxxxxxxxxxx>
- Date: Mon, 6 Nov 2006 17:50:26 -0500
hi all,
i got a problem with recv().
there's a thread to receive data from a server. periodically this thread has
to stop (to let others to do some work). i created some events to check them
inside the thread. the problem happens, when recv() starts and does not
receive any data from a server. this time the thread is stuck - recv() just
waits for data, and i can't stop the thread well (not using
TerminateThread() - btw, it's not a good idea, because a socket remains
"anchored" by the thread).
is there any way to "unblock" recv() somehow? WSAEventSelect() does not
help. looks like it's for different purposes.
thanks a lot.
--
alex c.
.
- Follow-Ups:
- Re: how to avoid recv() blocking issue?
- From: Alexey Yakovlev
- Re: how to avoid recv() blocking issue?
- From: Arkady Frenkel
- Re: how to avoid recv() blocking issue?
- Prev by Date: Re: Binding socket
- Next by Date: Re: how to avoid recv() blocking issue?
- Previous by thread: Re: Multiple Winsock servers
- Next by thread: Re: how to avoid recv() blocking issue?
- Index(es):
Relevant Pages
|