Re: Timeout on Async Receive
- From: Len Holgate <len.holgate@xxxxxxxxxxx>
- Date: Sun, 30 Sep 2007 06:03:37 -0700
Yes, that's exactly what I do here: http://www.lenholgate.com/archives/000306.html
On Sep 30, 12:56 am, "Sam Hobbs"
<sam...@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
I realize that this problem is probably solved already, but if I understand
the question then an alternative that also uses a single timer is to set a
timer for just the duration until the most recent timeout will occur. Then
it would be a matter of keeping the list sorted and of rescheduling the
timer when it either expires or the current timeout becomes unneeded.
"Alexander Nickolov" <agnicko...@xxxxxxxx> wrote in message
news:OBU$tYU%23HHA.2752@xxxxxxxxxxxxxxxxxxxxxxx
A single timer should suffice. I don't suppose you care much
for time accuracy... Have your timer execute every second and
check all sockets.
BTW, IOCP cannot be used with async I/O, perhaps you meant
overlapped I/O...
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnicko...@xxxxxxxx
MVP VC FAQ:http://vcfaq.mvps.org
=====================================
"Kürþat" <x...@xxxxxx> wrote in message
news:e9RWxeS%23HHA.1484@xxxxxxxxxxxxxxxxxxxxxxx
Hi,
I implemented a socket server by using IOCP and Async IO. The server
sends commands to connected clients and waits response from them. Now I
want to build a timeout mechanism for commands. If a client does not
respond along timeout period I should take some action for that client.
What is the best way to implement that? Should I start a timer for all
commands? Client count is about 3000-10000 so large number of timers may
be activated at a given time, what about this?
Thanks in advance.- Hide quoted text -
- Show quoted text -
.
- References:
- Timeout on Async Receive
- From: Kürşat
- Re: Timeout on Async Receive
- From: Alexander Nickolov
- Re: Timeout on Async Receive
- From: Sam Hobbs
- Timeout on Async Receive
- Prev by Date: Bleutooth authentication
- Next by Date: Process created by telnet session shows no windows, why ?
- Previous by thread: Re: Timeout on Async Receive
- Next by thread: Re: Timeout on Async Receive
- Index(es):
Relevant Pages
|
|