Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
diff options
context:
space:
mode:
authorLudovic Henry <ludovic@xamarin.com>2015-12-16 00:25:43 +0300
committerLudovic Henry <ludovic@xamarin.com>2015-12-16 13:11:42 +0300
commitb78f3f6f0733b4c62f772ebbe87f3c9612340713 (patch)
treef27bf939a49e558025db3c0ce255ea65e9245492 /mcs
parent42c503ad559541bd8a8b03b3c6d0b6693324da29 (diff)
[socket] Add test for SocketOptionName.MulticastTimeToLive
Diffstat (limited to 'mcs')
-rwxr-xr-xmcs/class/System/Test/System.Net.Sockets/SocketTest.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs b/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs
index c38da668521..9ee0c544769 100755
--- a/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs
+++ b/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs
@@ -4327,6 +4327,19 @@ namespace MonoTests.System.Net.Sockets
client.Receive (bytes, bytes.Length, 0);
client.Close ();
}
+
+ [Test]
+ public void UdpMulticasTimeToLive ()
+ {
+ /* see https://bugzilla.xamarin.com/show_bug.cgi?id=36941 */
+
+ using (Socket socket = new Socket (AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp)) {
+ IPEndPoint end_point = new IPEndPoint (IPAddress.Any, 11000);
+ socket.SetSocketOption (SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, 1);
+ socket.Bind (end_point);
+ socket.SetSocketOption (SocketOptionLevel.IP, SocketOptionName.MulticastTimeToLive, 19);
+ }
+ }
}
}