Imported Upstream version 6.6.0.132
Former-commit-id: 64f4ea15d36c33c867c5d282bc4b922c626a7199
This commit is contained in:
parent
617cd4d095
commit
47f3dfe12d
@ -1 +1 @@
|
||||
e63a80ab818ef0a46037803afb710be6ba0005c0
|
||||
8309317ee037a815f4ea5e0da21a8d295ac138bb
|
@ -1 +1 @@
|
||||
df71134b4bd3e4aed9d647417aa3330c4e9b3b4e
|
||||
2c3da2055ed8d39e323b4772a7e8900bbdd57720
|
@ -1 +1 @@
|
||||
0d6b344f9ca2923c6465a8978ac10c76e9cbf5b9
|
||||
8de80e92b25690f3c330c1a77f4211e145e371ce
|
@ -1 +1 @@
|
||||
3627807f156c3de3bd4d8df1a6b7c0669d6484a1
|
||||
a5b17251bf1b4f417ac562f2e9c98d4073d0ff5b
|
@ -1 +1 @@
|
||||
1617e73abb022826553279ef920edc829ab8d529
|
||||
00725101599ebd8c039e531859320754cb521f2e
|
@ -41,7 +41,7 @@ static partial class Consts
|
||||
// Use these assembly version constants to make code more maintainable.
|
||||
//
|
||||
|
||||
public const string MonoVersion = "6.6.0.131";
|
||||
public const string MonoVersion = "6.6.0.132";
|
||||
public const string MonoCompany = "Mono development team";
|
||||
public const string MonoProduct = "Mono Common Language Infrastructure";
|
||||
public const string MonoCopyright = "(c) Various Mono authors";
|
||||
|
@ -999,7 +999,7 @@ namespace System.Net.Sockets
|
||||
}
|
||||
});
|
||||
|
||||
public IAsyncResult BeginConnect (string host, int port, AsyncCallback requestCallback, object state)
|
||||
public IAsyncResult BeginConnect (string host, int port, AsyncCallback callback, object state)
|
||||
{
|
||||
ThrowIfDisposedAndClosed ();
|
||||
|
||||
@ -1012,32 +1012,23 @@ namespace System.Net.Sockets
|
||||
if (is_listening)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
var callback = new AsyncCallback ((result) => {
|
||||
var resultTask = ((Task<IPAddress[]>)result);
|
||||
BeginConnect (resultTask.Result, port, requestCallback, resultTask.AsyncState);
|
||||
});
|
||||
return ConvertToApm<IPAddress[]> (Dns.GetHostAddressesAsync (host), callback, state);
|
||||
}
|
||||
var sockares = new SocketAsyncResult (this, callback, state, SocketOperation.Connect) {
|
||||
Port = port
|
||||
};
|
||||
|
||||
private static IAsyncResult ConvertToApm<T> (Task<T> task, AsyncCallback callback, object state)
|
||||
{
|
||||
if (task == null)
|
||||
throw new ArgumentNullException ("task");
|
||||
|
||||
var tcs = new TaskCompletionSource<T> (state);
|
||||
task.ContinueWith (t =>
|
||||
{
|
||||
var dnsRequest = Dns.GetHostAddressesAsync (host);
|
||||
dnsRequest.ContinueWith (t => {
|
||||
if (t.IsFaulted)
|
||||
tcs.TrySetException (t.Exception.InnerExceptions);
|
||||
sockares.Complete (t.Exception.InnerException);
|
||||
else if (t.IsCanceled)
|
||||
tcs.TrySetCanceled ();
|
||||
else
|
||||
tcs.TrySetResult (t.Result);
|
||||
|
||||
if (callback != null)
|
||||
callback (tcs.Task);
|
||||
sockares.Complete (new OperationCanceledException ());
|
||||
else {
|
||||
sockares.Addresses = t.Result;
|
||||
BeginMConnect (sockares);
|
||||
}
|
||||
}, TaskScheduler.Default);
|
||||
return tcs.Task;
|
||||
|
||||
return sockares;
|
||||
}
|
||||
|
||||
public IAsyncResult BeginConnect (EndPoint remoteEP, AsyncCallback callback, object state)
|
||||
|
@ -1 +1 @@
|
||||
32adec28b202ea43ee62e2376d833b1422dcfe04
|
||||
26abf15ade2510913f1d42482631191500fa985f
|
@ -1 +1 @@
|
||||
2a60a99140fc86dce86c936b58167fe78901347a
|
||||
b1701237e1726c113994767f9ff62dae0ad15be1
|
@ -1 +1 @@
|
||||
dcd101068cd946291093bbd113d6e2d551d3cf42
|
||||
b42f680dd14b9a67c596cee26b948bfc2a269239
|
@ -1 +1 @@
|
||||
30fc7fab4ad97b7423a4b06e0081b2b217c19e3a
|
||||
b8eab7ac00058ebbd7a261a184698ccceb393eff
|
@ -1 +1 @@
|
||||
0b121317c7b73fcdf3e9a58f535d008d509fc37e
|
||||
eefd51c4ed6bdfd441a0cc7279769b9d9be2ae9f
|
@ -1 +1 @@
|
||||
ca81833a60fdf5e715648892e5f9ffa1d211a34f
|
||||
7fa4519772638afac2c70e0531ae91f2df7ec7ce
|
@ -1 +1 @@
|
||||
6680201b82f1dc7aa9b6ed727a066648c51d4632
|
||||
c73be7f9e1d55c4285ceab98cbe744370966d95b
|
@ -1 +1 @@
|
||||
e7de49b61277596a96c97b2b92f2866f93771513
|
||||
d75e6ff47e2c614235cf640ef55cdb8326b75ced
|
@ -1 +1 @@
|
||||
09d15444bec87738849c3420744a59e20724a05f
|
||||
f7ffc5ce4b753f55f87c9fea6724206556f17a65
|
@ -1 +1 @@
|
||||
2a60a99140fc86dce86c936b58167fe78901347a
|
||||
b1701237e1726c113994767f9ff62dae0ad15be1
|
@ -1 +1 @@
|
||||
dcd101068cd946291093bbd113d6e2d551d3cf42
|
||||
b42f680dd14b9a67c596cee26b948bfc2a269239
|
@ -1 +1 @@
|
||||
30fc7fab4ad97b7423a4b06e0081b2b217c19e3a
|
||||
b8eab7ac00058ebbd7a261a184698ccceb393eff
|
@ -1 +1 @@
|
||||
0b121317c7b73fcdf3e9a58f535d008d509fc37e
|
||||
eefd51c4ed6bdfd441a0cc7279769b9d9be2ae9f
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user