Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!ncar!husc6!m2c!seqp4!markr From: markr@seqp4.ORG (Mark Roddy) Newsgroups: comp.protocols.tcp-ip Subject: Re: How long before I can reopen a closed socket? Message-ID: <515@seqp4.UUCP> Date: 14 Jun 90 18:52:04 GMT References: <4847@litle.litle.COM> Organization: Sequoia Systems Inc., Marlboro, Mass. Lines: 29 In <4847@litle.litle.COM> tom@litle.litle.COM (tom hampton) writes: [How Long Must I Wait?] >We have a problem with a socket-based server application which needs to >restart quickly. What we find instead is that it may take a minute >before the passively binding program can reopen a socket after both >the active and passive binders have terminated. >2) We are using a "well known address" and these things don't recycle > instantly after closing (just a wild guess...) In fact you must wait: CHORUS: Two Times the Maximum Segment Lifetime! Which is the minute or two you describe. The solution is to not use the well known address for the connection - TCP allows you to accept a connection on a different port address than the destination address in the connection request. This is the mechanism used by most *nix TCP/IP services. The well-known address is always available to service the next incoming connection request. -- -Mark Roddy Sequoia Systems, Inc. (508) 480-0800 x1284 markr@seqp4.uucp m2c!seqp4!markr