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
diff options
context:
space:
mode:
authorMartin Baulig <mabaul@microsoft.com>2019-08-02 22:10:03 +0300
committerGitHub <noreply@github.com>2019-08-02 22:10:03 +0300
commit68181633830efecd1c14f96024272b1f4cca7915 (patch)
treeef74fc5faed6e10ab32584cea998ca979507b758 /mcs/class/System
parent2f21664fc2998f7a6ee1cf177031540316567858 (diff)
Use `MultipleConnectAsync` from CoreFX. (#15972)
* Use `MultipleConnectAsync` from CoreFX. * [csproj] Update project files
Diffstat (limited to 'mcs/class/System')
-rw-r--r--mcs/class/System/System.Net.Sockets/Socket.cs9
-rw-r--r--mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs7
-rw-r--r--mcs/class/System/System.csproj2
-rw-r--r--mcs/class/System/common.sources2
4 files changed, 18 insertions, 2 deletions
diff --git a/mcs/class/System/System.Net.Sockets/Socket.cs b/mcs/class/System/System.Net.Sockets/Socket.cs
index 0c9041b8e5d..8f463dd79c8 100644
--- a/mcs/class/System/System.Net.Sockets/Socket.cs
+++ b/mcs/class/System/System.Net.Sockets/Socket.cs
@@ -2950,6 +2950,15 @@ namespace System.Net.Sockets
return false;
#endif
}
+
+ internal void ReplaceHandleIfNecessaryAfterFailedConnect ()
+ {
+ /*
+ * This is called from `DualSocketMultipleConnectAsync.GetNextAddress(out Socket)`
+ * and `SingleSocketMultipleConnectAsync.GetNextAddress(out Socket)` when using
+ * the CoreFX version of `MultipleConnectAsync`.
+ */
+ }
}
}
diff --git a/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs b/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs
index f1e963a7967..6d22d76de52 100644
--- a/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs
+++ b/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs
@@ -213,6 +213,13 @@ namespace System.Net.Sockets
handler (e.current_socket, e);
}
+ internal void CopyBufferFrom (SocketAsyncEventArgs source)
+ {
+ Buffer = source.Buffer;
+ Offset = source.Offset;
+ Count = source.Count;
+ }
+
public void SetBuffer (int offset, int count)
{
SetBuffer (Buffer, offset, count);
diff --git a/mcs/class/System/System.csproj b/mcs/class/System/System.csproj
index f96864e2407..22898b0bd1d 100644
--- a/mcs/class/System/System.csproj
+++ b/mcs/class/System/System.csproj
@@ -451,6 +451,7 @@
<Compile Include="..\..\..\external\corefx\src\System.Net.Primitives\src\System\Net\IPAddressParser.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Primitives\src\System\Net\IPEndPoint.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.ServicePoint\src\System\Net\SecurityProtocolType.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Sockets\src\System\Net\Sockets\MultipleConnectAsync.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.WebClient\src\System\Net\WebClient.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\ClientWebSocket.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\ClientWebSocketOptions.cs" />
@@ -712,7 +713,6 @@
<Compile Include="..\referencesource\System\net\System\Net\Sockets\SocketType.cs" />
<Compile Include="..\referencesource\System\net\System\Net\Sockets\TransmitFileFlags.cs" />
<Compile Include="..\referencesource\System\net\System\Net\Sockets\UdpReceiveResult.cs" />
- <Compile Include="..\referencesource\System\net\System\Net\Sockets\_MultipleConnectAsync.cs" />
<Compile Include="..\referencesource\System\net\System\Net\TransportContext.cs" />
<Compile Include="..\referencesource\System\net\System\Net\TransportType.cs" />
<Compile Include="..\referencesource\System\net\System\Net\UnicodeDecodingConformance.cs" />
diff --git a/mcs/class/System/common.sources b/mcs/class/System/common.sources
index 26cb114a88b..0bc6430b7a3 100644
--- a/mcs/class/System/common.sources
+++ b/mcs/class/System/common.sources
@@ -665,7 +665,7 @@ ReferenceSources/Win32Exception.cs
../referencesource/System/net/System/Net/SecureProtocols/AuthenticatedStream.cs
../referencesource/System/net/System/Net/SecureProtocols/NegotiateEnumTypes.cs
-../referencesource/System/net/System/Net/Sockets/_MultipleConnectAsync.cs
+../../../external/corefx/src/System.Net.Sockets/src/System/Net/Sockets/MultipleConnectAsync.cs
../referencesource/System/net/System/Net/Sockets/AddressFamily.cs
../referencesource/System/net/System/Net/Sockets/IOControlCode.cs
../referencesource/System/net/System/Net/Sockets/IPPacketInformation.cs