Imported Upstream version 6.4.0.137

Former-commit-id: 943baa9f16a098c33e129777827f3a9d20da00d6
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-07-26 19:53:28 +00:00
parent e9207cf623
commit ef583813eb
2712 changed files with 74169 additions and 40587 deletions

View File

@@ -201,13 +201,16 @@ namespace MonoTests.System.Net.Sockets
}
[Test]
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Group ()
{
IPAddress group;
IPAddress local;
MulticastOption option;
local = Dns.GetHostEntry (string.Empty).AddressList [0];
local = Dns.GetHostEntry ("localhost").AddressList [0];
group = IPAddress.Parse ("239.255.255.250");
option = new MulticastOption (group, local);
group = IPAddress.Parse ("224.0.0.23");
@@ -234,6 +237,9 @@ namespace MonoTests.System.Net.Sockets
}
[Test]
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void InterfaceIndex ()
{
IPAddress group;
@@ -255,7 +261,7 @@ namespace MonoTests.System.Net.Sockets
Assert.AreEqual (0xFFFFFF, option.InterfaceIndex, "#C2");
Assert.IsNull (option.LocalAddress, "#C3");
local = Dns.GetHostEntry (string.Empty).AddressList [0];
local = Dns.GetHostEntry ("localhost").AddressList [0];
option = new MulticastOption (group, local);
option.InterfaceIndex = 10;
Assert.AreSame (group, option.Group, "#D1");
@@ -296,13 +302,16 @@ namespace MonoTests.System.Net.Sockets
}
[Test]
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void LocalAddress ()
{
IPAddress group;
IPAddress local;
MulticastOption option;
local = Dns.GetHostEntry (string.Empty).AddressList [0];
local = Dns.GetHostEntry ("localhost").AddressList [0];
group = IPAddress.Parse ("239.255.255.250");
option = new MulticastOption (group, local);
local = IPAddress.Loopback;
@@ -310,7 +319,7 @@ namespace MonoTests.System.Net.Sockets
Assert.AreSame (group, option.Group, "#A1");
Assert.AreEqual (0, option.InterfaceIndex, "#A2");
Assert.AreSame (local, option.LocalAddress, "#A3");
local = Dns.GetHostEntry (string.Empty).AddressList [0];
local = Dns.GetHostEntry ("localhost").AddressList [0];
option.LocalAddress = local;
Assert.AreSame (group, option.Group, "#B1");
Assert.AreEqual (0, option.InterfaceIndex, "#B2");

View File

@@ -55,7 +55,7 @@ namespace MonoCasTests.System.Net.Sockets {
{
reset = new ManualResetEvent (false);
IPHostEntry host = Dns.Resolve ("www.google.com");
IPHostEntry host = Dns.Resolve ("www.example.com");
IPAddress ip = host.AddressList[0];
socket = new Socket (ip.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
socket.Connect (new IPEndPoint (ip, 80));

View File

@@ -29,7 +29,7 @@ namespace MonoTests.System.Net.Sockets
#endif
public void NetworkStreamConnection ()
{
IPEndPoint ipe = new IPEndPoint(Dns.GetHostEntry ("www.google.com").AddressList [0], 80);
IPEndPoint ipe = new IPEndPoint(Dns.GetHostEntry ("www.example.com").AddressList [0], 80);
Socket s = new Socket(ipe.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
s.Close ();
NetworkStream ns = new NetworkStream (s);

View File

@@ -38,7 +38,7 @@ namespace MonoCasTests.System.Net.Sockets {
{
reset = new ManualResetEvent (false);
IPHostEntry host = Dns.Resolve ("www.google.com");
IPHostEntry host = Dns.Resolve ("www.example.com");
IPAddress ip = host.AddressList[0];
ep = new IPEndPoint (ip, 80);
socket = new Socket (ip.AddressFamily, SocketType.Stream, ProtocolType.Tcp);

View File

@@ -1 +1 @@
14976edb39c9c0643ba059f92078e0e93a0eb567
3dc69374874d14e90b24abf706902b0dacb2d02d

View File

@@ -76,7 +76,7 @@ namespace MonoCasTests.System.Net.Sockets {
TcpClient s = new TcpClient ();
message = "AsyncConnect";
reset.Reset ();
IAsyncResult r = s.BeginConnect ("www.google.com", 80, new AsyncCallback (ConnectCallback), s);
IAsyncResult r = s.BeginConnect ("www.example.com", 80, new AsyncCallback (ConnectCallback), s);
Assert.IsNotNull (r, "IAsyncResult");
if (!reset.WaitOne (timeout, true))
Assert.Ignore ("Timeout");
@@ -88,7 +88,7 @@ namespace MonoCasTests.System.Net.Sockets {
[Category ("InetAccess")]
public void AsyncConnect_IPAddressIntAsyncCallbackObject ()
{
IPHostEntry host = Dns.Resolve ("www.google.com");
IPHostEntry host = Dns.Resolve ("www.example.com");
TcpClient s = new TcpClient ();
message = "AsyncConnect";
reset.Reset ();
@@ -104,7 +104,7 @@ namespace MonoCasTests.System.Net.Sockets {
[Category ("InetAccess")]
public void AsyncConnect_IPAddressArrayIntAsyncCallbackObject ()
{
IPHostEntry host = Dns.Resolve ("www.google.com");
IPHostEntry host = Dns.Resolve ("www.example.com");
TcpClient s = new TcpClient ();
message = "AsyncConnect";
reset.Reset ();

View File

@@ -872,7 +872,7 @@ namespace MonoTests.System.Net.Sockets {
public void JoinMulticastGroup4_Socket_NotBound ()
{
IPAddress mcast_addr = IPAddress.Parse ("224.0.0.23");
IPAddress local_addr = Dns.GetHostEntry (string.Empty).AddressList [0];
IPAddress local_addr = Dns.GetHostEntry ("localhost").AddressList [0];
using (UdpClient client = new UdpClient (AddressFamily.InterNetwork)) {
client.JoinMulticastGroup (mcast_addr, local_addr);
@@ -980,7 +980,7 @@ namespace MonoTests.System.Net.Sockets {
"BeginSend #4");
}
IPAddress[] addresses = Dns.GetHostEntry (string.Empty).AddressList;
IPAddress[] addresses = Dns.GetHostEntry ("localhost").AddressList;
IPEndPoint ep = null;
foreach (IPAddress a in addresses) {
if (a.AddressFamily == AddressFamily.InterNetwork) {