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:
authormonojenkins <jo.shields+jenkins@xamarin.com>2015-12-16 14:35:02 +0300
committermonojenkins <jo.shields+jenkins@xamarin.com>2015-12-16 14:35:02 +0300
commit431334491983b99f9390b1ccb9ee11322365b548 (patch)
tree439c70e855c405e5aeb043997afa14183126cd15 /mcs
parent9dc34141e190d9b5521ca3be8e52335b0521d0ae (diff)
parentb78f3f6f0733b4c62f772ebbe87f3c9612340713 (diff)
Merge pull request #2351 from ludovic-henry/fix-socket-36941
[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);
+ }
+ }
}
}