Re: Ho to detect unused connections with Io Completion ports?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Alexander Nickolov (agnickolov_at_mvps.org)
Date: 02/07/05


Date: Mon, 7 Feb 2005 10:20:56 -0800

You got it :). TCP does not require any data to keep a
connection alive - it can stay up for days. Telnet is an
example - if you leave your terminal for the day, the
connection is still there tomorrow (or after a weekend).
Not that anyody uses such terminals anymore...

However, when traversing NAT routers, the connection
may break if the NAT binding is released due to inactivity.
Neither end knows about that, so when the connection
resumes activity, the packets will be dropped by the NAT
router. Eventually TCP will realize based on long timeouts
and close the connection. TCP also has a mechanism to
periodically check the health of a connection - activated
via the keep-alive socket option.

-- 
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@mvps.org
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
"Someone" <Someone@discussions.microsoft.com> wrote in message 
news:B94F8E92-71A9-447A-938F-2F505902B6C0@microsoft.com...
> Well I have the SDK sample...
>
> Once a client is connected he is connected for ever...
>
> I wan' t to detect whether a client has been inactive and to close his
> connection...
>
> But I kind of know the answer just want confirmation...
>
> "Arkady Frenkel" wrote:
>
>> Free up to now ? What if in a second some peer will want to connect ?
>> Arkady
>>
>> "Someone" <Someone@discussions.microsoft.com> wrote in message
>> news:07816A70-0E93-4409-A5C9-CD7D3AC50C1C@microsoft.com...
>> > Is there a way to detect wether a certain server socket after accept is
>> > not
>> > in use and to free it up?
>> >
>> > Thanks!
>>
>>
>> 


Relevant Pages

  • Re: WinRoute Pro
    ... If a RST is sent to a TCP protocol host, ... 1/ Check the NAT table. ... 2/ Open a TCP connection to a host using a port tool. ... Winroute's logs are no substitute for a decent packet sniffer. ...
    (comp.security.firewalls)
  • Re: NAT and keepaliveopen connection over TCP
    ... sent after 10 minutes of inactivity on the TCP connection. ... There's no minimum set time how long a NAT router should ... time-out inactive connections at the server. ...
    (microsoft.public.win32.programmer.networks)
  • [Full-disclosure] Cisco PIX TCP Connection Prevention
    ... Cisco PIX TCP ... Connection Prevention, posted on November 22, 2005. ... By sending a TCP SYN packet with an incorrect checksum through a PIX ...
    (Full-Disclosure)
  • [Full-disclosure] Cisco PIX TCP Connection Prevention
    ... Cisco PIX TCP ... Connection Prevention, posted on November 22, 2005. ... By sending a TCP SYN packet with an incorrect checksum through a PIX ...
    (Full-Disclosure)
  • [NEWS] Cisco PIX TCP Connection DoS
    ... Get your security news from a reliable source. ... By crafting a special TCP packet and sending it to a vulnerable Cisco PIX, ... embryonic connection open until the embryonic connection timeout which is ...
    (Securiteam)