This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: setsockopt SO_REUSEADDR
- From: "Dave Korn" <dk at artimi dot com>
- To: <cygwin at cygwin dot com>
- Date: Tue, 5 Oct 2004 15:43:33 +0100
- Subject: RE: setsockopt SO_REUSEADDR
> -----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?
> why doen't bind() return an error under cygwin?
Because SO_REUSEADDR works _correctly_ on cygwin, perhaps?
cheers,
DaveK
--
Can't think of a witty .sigline today....
--
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/