[System] Check SocketOptionName.ReuseAddress support.
authorMarcos Henrich <marcos.henrich@xamarin.com>
Thu, 19 Nov 2015 10:53:16 +0000 (10:53 +0000)
committerMarcos Henrich <marcos.henrich@xamarin.com>
Wed, 17 Feb 2016 09:56:14 +0000 (09:56 +0000)
commit9d3d44013f5ca5311404737bb384b76654d414ff
treed0381c36ee87496e0ddbf53074c27269b5ac926e
parent9e17248c03a49708bd1e60fec0e2cdb0684f378b
[System] Check SocketOptionName.ReuseAddress support.

Operating systems that use linux kernels before 3.9 do not support
binding multiple socket to the same address and port.

In those systems even if it was possible to set
SocketOptionName.ReuseAddress an exception was thrown on the second
bind.

These changes introduce a SocketException that is thrown when
SocketOptionName.ReuseAddress is set on a system that will fail to bind
multiple times to the same address.
mcs/class/System/System.Net.Sockets/Socket.cs
mcs/class/System/Test/System.Net.Sockets/SocketTest.cs