Re: Ho to detect unused connections with Io Completion ports?
From: Alexander Nickolov (agnickolov_at_mvps.org)
Date: 02/07/05
- Next message: Alexander Nickolov: "Re: WSAETIMEDOUT"
- Previous message: Alexander Nickolov: "Re: finding a .pac file"
- In reply to: Someone: "Re: Ho to detect unused connections with Io Completion ports?"
- Messages sorted by: [ date ] [ thread ]
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! >> >> >>
- Next message: Alexander Nickolov: "Re: WSAETIMEDOUT"
- Previous message: Alexander Nickolov: "Re: finding a .pac file"
- In reply to: Someone: "Re: Ho to detect unused connections with Io Completion ports?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|