|
Jim, Be careful not to get sockets & ports confused. It's the port that you're concerned about re-using, not the socket. Yes, if you know what the MSL is, you could wait 2 x MSL before opening again (actually, I'd probably try 2.5 x MSL, since 2 x MSL is when the TCP/IP stack stops waiting, and the actual closing operation may take a few milliseconds -- not to mention things like run priorities and time slices that may cause it to be delayed by a few seconds) Personally, I just use SO_REUSEADDR if I want to avoid that problem. I don't really see the advantage of trying to figure out the MSL or wait for it -- so I really can't help you determine the MSL. I believe it's 1 minute on the AS/400, so after about 2 minutes you should be able to re-bind... but I have no idea where/if that's set, or how to determine it... :) On Thu, 26 Jul 2001, JIM LANGSTON wrote: > Hmm.. so if this program waits 2 x MSL before attempting to open the socket > then the socket should always be available, unless another program is > actively using it? > > Sounds logical. How does one determine the MSL, or does one? > > Regards, > > Jim Langston > +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.