delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Date: | Tue, 5 Oct 2004 09:54:39 -0500 |
From: | Brian Ford <ford AT vss DOT fsi DOT com> |
Reply-To: | cygwin AT cygwin DOT com |
To: | Dave Korn <dk AT artimi DOT com> |
cc: | cygwin AT cygwin DOT com |
Subject: | RE: setsockopt SO_REUSEADDR |
In-Reply-To: | <NUTMEGcvJY4WocwAQq10000027b@NUTMEG.CAM.ARTIMI.COM> |
Message-ID: | <Pine.CYG.4.58.0410050951540.5620@fordpc.vss.fsi.com> |
References: | <NUTMEGcvJY4WocwAQq10000027b AT NUTMEG DOT CAM DOT ARTIMI DOT COM> |
MIME-Version: | 1.0 |
X-IsSubscribed: | yes |
On Tue, 5 Oct 2004, Dave Korn wrote: > > -----Original Message----- > > From: cygwin-owner On Behalf Of Rainer Hochreiter > > Sent: 05 October 2004 15:29 > > > running the program listed below with argument 'reuse' under > > cygwin and linux returns different results! > > > > from my point of view, the linux result is quite what i > > expected, a bind() error 'Address already in use'. > > Huh? But that's exactly what SO_REUSEADDR is supposed to _prevent_ > from happening. That's why it's called _REUSE_addr, because it lets you > *re-use* an addr, without getting an error message. Why would you > expect setting it to stop you from reusing the address? I was about to say the same thing, but... http://www.unixguide.net/network/socketfaq/4.5.shtml It is only supposed to reuse if the other socket is in the TIME_WAIT state. I think that is what he is complaining about. BTW to the OP, why are you printing the address of the socket function out? I think you meant to print "s" instead of "socket"? -- Brian Ford Senior Realtime Software Engineer VITAL - Visual Simulation Systems FlightSafety International the best safety device in any aircraft is a well-trained pilot... -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |