Skip to content

Commit

Permalink
Reimplement APM UDP Socket methods on top of task variants and consol…
Browse files Browse the repository at this point in the history
…idate related tests (#47781)

Contributes to #43845. Reimplements (Begin|End)(SendTo|ReceiveFrom|ReceiveMessageFrom) on top of the new Task-based variants, and deletes unused code. Moves all related argument validation tests from ArgumentValidationTests.cs to SendTo.cs, ReceiveFrom.cs and ReceiveMessageFrom.cs, and extends coverage.
  • Loading branch information
antonfirsov committed Feb 9, 2021
1 parent d8aa4c6 commit 7ad8af5
Show file tree
Hide file tree
Showing 18 changed files with 376 additions and 1,494 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)</TargetFrameworks>
Expand Down Expand Up @@ -46,8 +46,6 @@
<Compile Include="System\Net\Sockets\AcceptOverlappedAsyncResult.cs" />
<Compile Include="System\Net\Sockets\BaseOverlappedAsyncResult.cs" />
<Compile Include="System\Net\Sockets\DisconnectOverlappedAsyncResult.cs" />
<Compile Include="System\Net\Sockets\OverlappedAsyncResult.cs" />
<Compile Include="System\Net\Sockets\ReceiveMessageOverlappedAsyncResult.cs" />
<Compile Include="System\Net\Sockets\UnixDomainSocketEndPoint.cs" />
<!-- Logging -->
<Compile Include="$(CommonPath)System\Net\Logging\NetEventSource.Common.cs"
Expand Down Expand Up @@ -94,9 +92,7 @@
<!-- Windows: CoreCLR -->
<Compile Include="System\Net\Sockets\AcceptOverlappedAsyncResult.Windows.cs" />
<Compile Include="System\Net\Sockets\BaseOverlappedAsyncResult.Windows.cs" />
<Compile Include="System\Net\Sockets\OverlappedAsyncResult.Windows.cs" />
<Compile Include="System\Net\Sockets\DynamicWinsockMethods.cs" />
<Compile Include="System\Net\Sockets\ReceiveMessageOverlappedAsyncResult.Windows.cs" />
<Compile Include="System\Net\Sockets\SafeSocketHandle.Windows.cs" />
<Compile Include="System\Net\Sockets\Socket.Windows.cs" />
<Compile Include="System\Net\Sockets\SocketAsyncEventArgs.Windows.cs" />
Expand Down Expand Up @@ -192,8 +188,6 @@
<Compile Include="System\Net\Sockets\AcceptOverlappedAsyncResult.Unix.cs" />
<Compile Include="System\Net\Sockets\BaseOverlappedAsyncResult.Unix.cs" />
<Compile Include="System\Net\Sockets\DisconnectOverlappedAsyncResult.Unix.cs" />
<Compile Include="System\Net\Sockets\OverlappedAsyncResult.Unix.cs" />
<Compile Include="System\Net\Sockets\ReceiveMessageOverlappedAsyncResult.Unix.cs" />
<Compile Include="System\Net\Sockets\SafeSocketHandle.Unix.cs" />
<Compile Include="System\Net\Sockets\Socket.Unix.cs" />
<Compile Include="System\Net\Sockets\SocketAsyncContext.Unix.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,5 @@ internal partial class BaseOverlappedAsyncResult : ContextAwareResult
_numBytes = numBytes;
return s_resultObjectSentinel; // return sentinel rather than boxing numBytes
}

// Used instead of the base InternalWaitForCompletion when storing an Int32 result
internal int InternalWaitForCompletionInt32Result()
{
base.InternalWaitForCompletion();
return _numBytes;
}
}
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 7ad8af5

Please sign in to comment.