[Mono-bugs] [Bug 80211][Wis] Changed - SocketOptionName.ReuseAddress doesn't work on Linux
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue Dec 12 12:31:37 EST 2006
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by dick at ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=80211
--- shadow/80211 2006-12-09 23:08:11.000000000 -0500
+++ shadow/80211.tmp.13084 2006-12-12 12:31:37.000000000 -0500
@@ -1,13 +1,13 @@
Bug#: 80211
Product: Mono: Class Libraries
Version: 1.2
OS: GNU/Linux [Other]
OS Details:
-Status: NEW
-Resolution:
+Status: RESOLVED
+Resolution: NOTABUG
Severity: 008 One day
Priority: Wishlist
Component: System
AssignedTo: mono-bugs at ximian.com
ReportedBy: Cikki.Mukki at gmail.com
QAContact: mono-bugs at ximian.com
@@ -74,6 +74,21 @@
SocketOptionName.ReuseAddress, 1);
connectSocket.Bind(new IPEndPoint(IPAddress.Any, port));
//connectSocket.Connect(new IPEndPoint("65.34.23.23",
80));
Console.WriteLine("Connect done.");
+
+------- Additional Comments From dick at ximian.com 2006-12-12 12:31 -------
+You can't bind more than one socket at once to an address:port tuple.
+ SocketOption.ReuseAddress means that the socket will not wait in
+TIME_WAIT state after it has been closed, thereby allowing another
+socket to immediately reuse the same address and port.
+
+On windows the bind succeeds, but iirc only the latterly bound socket
+will receive any packets. I would regard this as a windows bug; it's
+definitely not consistent with the BSD sockets interface.
+
+For your app, do you mean that responses to a connection on a
+particular port should come from that port? In that case just the
+listenSocket part is needed, and any data written to remote sockets
+that connect to that socket will be sent from that port.
More information about the mono-bugs
mailing list