Re: How can I make a PERFECT RE-USABLE SOCKET ?
- From: Novice <Novice@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 24 Jul 2005 20:34:04 -0700
Thank you for your reply.
But, as you know, DisconnectEx Function has "TF_REUSE_SOCKET" flag.
I used it, and then I could see "TIME_WAIT" state at connect-side.
So, I wanna know how to check or avoid that state.
--
( NOVICE )
Student~
Seoul. Korea.
"Alexander Nickolov" wrote:
> Sockets are _designed_ _not_ to be reusable. You should
> close them and create new sockets instead.
>
> --
> =====================================
> Alexander Nickolov
> Microsoft MVP [VC], MCSD
> email: agnickolov@xxxxxxxx
> MVP VC FAQ: http://www.mvps.org/vcfaq
> =====================================
>
> "Novice" <Novice@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:E4356583-F456-4FE7-9127-5E78CC014AF2@xxxxxxxxxxxxxxxx
> > Subject : How can I make a PERFECT RE-USABLE SOCKET ?
> >
> >
> >
> > I have some problems to make a network component.
> >
> > It is a "TIME_WAIT" state on client socket.
> >
> > When the socket is in "TIME_WAIT" state, it cannot connect into any remote
> > server.
> >
> > How can I avoid "TIME_WAIT" state?
> >
> > Or, is there any function that can check a socket in "TIME_WAIT" or not ?
> >
> >
> >
> > I disconnect all sessions using "DisconnectEx" function for re-using
> > socket.
> >
> > And, all sockets are pre-binded.
> >
> > There are no problem when I disconnect client from server.
> >
> > But, client disconnects itself and then socket falls in "TIME_WAIT" state.
> >
> > I tryed to remove that state, but I can't. (failed..all)
> >
> > I applied handshaking routine, LINGER option and changing into blocking
> > mode..
> >
> > As you know, TIME_WAIT state's duration is so~~~~ long!!
> >
> > So, I want to know, how to check it or avoid it. ( TIME_WAIT state )
> >
> >
> >
> > --
> > ( NOVICE )
> > Student~
> > Seoul. Korea.
>
>
>
.
- References:
- How can I make a PERFECT RE-USABLE SOCKET ?
- From: Novice
- Re: How can I make a PERFECT RE-USABLE SOCKET ?
- From: Alexander Nickolov
- How can I make a PERFECT RE-USABLE SOCKET ?
- Prev by Date: Re: How to install .NET framework in the clients of my LAN ?
- Next by Date: Re: How can I make a PERFECT RE-USABLE SOCKET ?
- Previous by thread: Re: How can I make a PERFECT RE-USABLE SOCKET ?
- Next by thread: Re: How can I make a PERFECT RE-USABLE SOCKET ?
- Index(es):
Relevant Pages
|