Imported Upstream version 5.0.0.42

Former-commit-id: fd56571888259555122d8a0f58c68838229cea2b
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-04-10 11:41:01 +00:00
parent 1190d13a04
commit 6bdd276d05
19939 changed files with 3099680 additions and 93811 deletions

View File

@ -0,0 +1,164 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Net.Sockets.Tests", "tests\FunctionalTests\System.Net.Sockets.Tests.csproj", "{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}"
ProjectSection(ProjectDependencies) = postProject
{} = {}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Net.Sockets.Async.Performance.Tests", "tests\PerformanceTests\System.Net.Sockets.Async.Performance.Tests.csproj", "{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}"
ProjectSection(ProjectDependencies) = postProject
{} = {}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Net.Sockets.Async.Performance.Tests", "tests\PerformanceTests\System.Net.Sockets.Async.Performance.Tests.csproj", "{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}"
ProjectSection(ProjectDependencies) = postProject
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B} = {43311AFB-D7C4-4E5A-B1DE-855407F90D1B}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Net.Sockets.Tests", "tests\FunctionalTests\System.Net.Sockets.Tests.csproj", "{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}"
ProjectSection(ProjectDependencies) = postProject
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B} = {43311AFB-D7C4-4E5A-B1DE-855407F90D1B}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{89BE5448-6E11-4ABC-87C6-988225002CB3}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{2CBE9859-F121-4AC1-9105-C443A7548354}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{E27FC519-A041-42C7-AFA6-EB894510FE76}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Net.Sockets", "ref\System.Net.Sockets.csproj", "{9E212427-18B3-4EF4-966C-ED18AAC08422}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Net.Sockets", "src\System.Net.Sockets.csproj", "{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "FunctionalTests", "FunctionalTests", "{D4227E7F-1EB9-4804-803F-D0C76B0C2BAC}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PerformanceTests", "PerformanceTests", "{750C8651-7245-451F-91C4-FFE352EFC4A0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
DebugNETCoreAppnetcore50-Windows_NTnetcoreapp-Windows_NT|AnyCPU = DebugNETCoreAppnetcore50-Windows_NTnetcoreapp-Windows_NT|AnyCPU
ReleaseNETCoreAppnetcore50-Windows_NTnetcoreapp-Windows_NT|AnyCPU = ReleaseNETCoreAppnetcore50-Windows_NTnetcoreapp-Windows_NT|AnyCPU
DebugNETCoreAppnetcore50-Windows_NTnetcoreapp-Unix|AnyCPU = DebugNETCoreAppnetcore50-Windows_NTnetcoreapp-Unix|AnyCPU
ReleaseNETCoreAppnetcore50-Windows_NTnetcoreapp-Unix|AnyCPU = ReleaseNETCoreAppnetcore50-Windows_NTnetcoreapp-Unix|AnyCPU
DebugNETCoreAppnetcoreapp-Unixnetcoreapp-Windows_NT|AnyCPU = DebugNETCoreAppnetcoreapp-Unixnetcoreapp-Windows_NT|AnyCPU
ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp-Windows_NT|AnyCPU = ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp-Windows_NT|AnyCPU
DebugNETCoreAppnetcoreapp-Unixnetcoreapp-Unix|AnyCPU = DebugNETCoreAppnetcoreapp-Unixnetcoreapp-Unix|AnyCPU
ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp-Unix|AnyCPU = ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp-Unix|AnyCPU
DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Windows_NT|AnyCPU = DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Windows_NT|AnyCPU
ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Windows_NT|AnyCPU = ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Windows_NT|AnyCPU
DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Unix|AnyCPU = DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Unix|AnyCPU
ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Unix|AnyCPU = ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Unix|AnyCPU
DebugNETCoreAppnet463-Windows_NTnetcoreapp-Windows_NT|AnyCPU = DebugNETCoreAppnet463-Windows_NTnetcoreapp-Windows_NT|AnyCPU
ReleaseNETCoreAppnet463-Windows_NTnetcoreapp-Windows_NT|AnyCPU = ReleaseNETCoreAppnet463-Windows_NTnetcoreapp-Windows_NT|AnyCPU
DebugNETCoreAppnet463-Windows_NTnetcoreapp-Unix|AnyCPU = DebugNETCoreAppnet463-Windows_NTnetcoreapp-Unix|AnyCPU
ReleaseNETCoreAppnet463-Windows_NTnetcoreapp-Unix|AnyCPU = ReleaseNETCoreAppnet463-Windows_NTnetcoreapp-Unix|AnyCPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.DebugNETCoreAppnetcore50-Windows_NTnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.DebugNETCoreAppnetcore50-Windows_NTnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.ReleaseNETCoreAppnetcore50-Windows_NTnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.ReleaseNETCoreAppnetcore50-Windows_NTnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.DebugNETCoreAppnetcore50-Windows_NTnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Unix-Debug|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.DebugNETCoreAppnetcore50-Windows_NTnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Unix-Debug|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.ReleaseNETCoreAppnetcore50-Windows_NTnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Unix-Release|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.ReleaseNETCoreAppnetcore50-Windows_NTnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Unix-Release|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.DebugNETCoreAppnetcoreapp-Unixnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.DebugNETCoreAppnetcoreapp-Unixnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.DebugNETCoreAppnetcoreapp-Unixnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Unix-Debug|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.DebugNETCoreAppnetcoreapp-Unixnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Unix-Debug|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Unix-Release|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Unix-Release|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Unix-Debug|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Unix-Debug|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Unix-Release|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Unix-Release|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.DebugNETCoreAppnet463-Windows_NTnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.DebugNETCoreAppnet463-Windows_NTnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.DebugNETCoreAppnet463-Windows_NTnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Unix-Debug|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.DebugNETCoreAppnet463-Windows_NTnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Unix-Debug|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Unix-Release|Any CPU
{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Unix-Release|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.DebugNETCoreAppnetcore50-Windows_NTnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.DebugNETCoreAppnetcore50-Windows_NTnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.ReleaseNETCoreAppnetcore50-Windows_NTnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.ReleaseNETCoreAppnetcore50-Windows_NTnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.DebugNETCoreAppnetcore50-Windows_NTnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Unix-Debug|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.DebugNETCoreAppnetcore50-Windows_NTnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Unix-Debug|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.ReleaseNETCoreAppnetcore50-Windows_NTnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Unix-Release|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.ReleaseNETCoreAppnetcore50-Windows_NTnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Unix-Release|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.DebugNETCoreAppnetcoreapp-Unixnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.DebugNETCoreAppnetcoreapp-Unixnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.DebugNETCoreAppnetcoreapp-Unixnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Unix-Debug|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.DebugNETCoreAppnetcoreapp-Unixnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Unix-Debug|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Unix-Release|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Unix-Release|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Unix-Debug|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Unix-Debug|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Unix-Release|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Unix-Release|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.DebugNETCoreAppnet463-Windows_NTnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.DebugNETCoreAppnet463-Windows_NTnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.DebugNETCoreAppnet463-Windows_NTnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Unix-Debug|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.DebugNETCoreAppnet463-Windows_NTnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Unix-Debug|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Unix-Release|Any CPU
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Unix-Release|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.DebugNETCoreAppnetcore50-Windows_NTnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcore50-Windows_NT-Debug|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.DebugNETCoreAppnetcore50-Windows_NTnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcore50-Windows_NT-Debug|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.ReleaseNETCoreAppnetcore50-Windows_NTnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcore50-Windows_NT-Release|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.ReleaseNETCoreAppnetcore50-Windows_NTnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcore50-Windows_NT-Release|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.DebugNETCoreAppnetcore50-Windows_NTnetcoreapp-Unix|AnyCPU.ActiveCfg = netcore50-Windows_NT-Debug|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.DebugNETCoreAppnetcore50-Windows_NTnetcoreapp-Unix|AnyCPU.Build.0 = netcore50-Windows_NT-Debug|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.ReleaseNETCoreAppnetcore50-Windows_NTnetcoreapp-Unix|AnyCPU.ActiveCfg = netcore50-Windows_NT-Release|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.ReleaseNETCoreAppnetcore50-Windows_NTnetcoreapp-Unix|AnyCPU.Build.0 = netcore50-Windows_NT-Release|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.DebugNETCoreAppnetcoreapp-Unixnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Unix-Debug|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.DebugNETCoreAppnetcoreapp-Unixnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Unix-Debug|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Unix-Release|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Unix-Release|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.DebugNETCoreAppnetcoreapp-Unixnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Unix-Debug|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.DebugNETCoreAppnetcoreapp-Unixnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Unix-Debug|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Unix-Release|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Unix-Release|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.DebugNETCoreAppnet463-Windows_NTnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = net463-Windows_NT-Debug|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.DebugNETCoreAppnet463-Windows_NTnetcoreapp-Windows_NT|AnyCPU.Build.0 = net463-Windows_NT-Debug|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = net463-Windows_NT-Release|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp-Windows_NT|AnyCPU.Build.0 = net463-Windows_NT-Release|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.DebugNETCoreAppnet463-Windows_NTnetcoreapp-Unix|AnyCPU.ActiveCfg = net463-Windows_NT-Debug|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.DebugNETCoreAppnet463-Windows_NTnetcoreapp-Unix|AnyCPU.Build.0 = net463-Windows_NT-Debug|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp-Unix|AnyCPU.ActiveCfg = net463-Windows_NT-Release|Any CPU
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp-Unix|AnyCPU.Build.0 = net463-Windows_NT-Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6} = {8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}
{43311AFB-D7C4-4E5A-B1DE-855407F90D1B} = {43311AFB-D7C4-4E5A-B1DE-855407F90D1B}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\dir.props" />
<PropertyGroup>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<IsNETCoreApp>true</IsNETCoreApp>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
uap;
</BuildConfigurations>
</PropertyGroup>
</Project>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap-Release|AnyCPU'" />
<ItemGroup>
<Compile Include="System.Net.Sockets.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\System.IO\ref\System.IO.csproj" />
<ProjectReference Include="..\..\System.IO.FileSystem.Primitives\ref\System.IO.FileSystem.Primitives.csproj" />
<ProjectReference Include="..\..\System.Net.Primitives\ref\System.Net.Primitives.csproj" />
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
<ProjectReference Include="..\..\System.Threading.Tasks\ref\System.Threading.Tasks.csproj" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>

View File

@ -0,0 +1,3 @@
Compat issues with assembly System.Net.Sockets:
CannotRemoveBaseTypeOrInterface : Type 'System.Net.Sockets.NetworkStream' does not inherit from base type 'System.MarshalByRefObject' in the implementation but it does in the contract.
Total Issues: 1

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildConfigurations>
netcore50-Windows_NT;
netcoreapp-Unix;
netcoreapp-Windows_NT;
net463-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,309 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="net_invalidversion" xml:space="preserve">
<value>This protocol version is not supported.</value>
</data>
<data name="net_noseek" xml:space="preserve">
<value>This stream does not support seek operations.</value>
</data>
<data name="net_invasync" xml:space="preserve">
<value>Cannot block a call on this socket while an earlier asynchronous call is in progress.</value>
</data>
<data name="net_io_timeout_use_gt_zero" xml:space="preserve">
<value>Timeout can be only be set to 'System.Threading.Timeout.Infinite' or a value &gt; 0.</value>
</data>
<data name="net_notconnected" xml:space="preserve">
<value>The operation is not allowed on non-connected sockets.</value>
</data>
<data name="net_notstream" xml:space="preserve">
<value>The operation is not allowed on non-stream oriented sockets.</value>
</data>
<data name="net_stopped" xml:space="preserve">
<value>Not listening. You must call the Start() method before calling this method.</value>
</data>
<data name="net_udpconnected" xml:space="preserve">
<value>Cannot send packets to an arbitrary host while connected.</value>
</data>
<data name="net_readonlystream" xml:space="preserve">
<value>The stream does not support writing.</value>
</data>
<data name="net_writeonlystream" xml:space="preserve">
<value>The stream does not support reading.</value>
</data>
<data name="net_InvalidSocketHandle" xml:space="preserve">
<value>The socket handle is not valid.</value>
</data>
<data name="net_InvalidAddressFamily" xml:space="preserve">
<value>The AddressFamily {0} is not valid for the {1} end point, use {2} instead.</value>
</data>
<data name="net_InvalidEndPointAddressFamily" xml:space="preserve">
<value>The supplied EndPoint of AddressFamily {0} is not valid for this Socket, use {1} instead.</value>
</data>
<data name="net_InvalidSocketAddressSize" xml:space="preserve">
<value>The supplied {0} is an invalid size for the {1} end point.</value>
</data>
<data name="net_invalidAddressList" xml:space="preserve">
<value>None of the discovered or specified addresses match the socket address family.</value>
</data>
<data name="net_completed_result" xml:space="preserve">
<value>This operation cannot be performed on a completed asynchronous result object.</value>
</data>
<data name="net_protocol_invalid_family" xml:space="preserve">
<value>'{0}' Client can only accept InterNetwork or InterNetworkV6 addresses.</value>
</data>
<data name="net_protocol_invalid_multicast_family" xml:space="preserve">
<value>Multicast family is not the same as the family of the '{0}' Client.</value>
</data>
<data name="net_sockets_zerolist" xml:space="preserve">
<value>The parameter {0} must contain one or more elements.</value>
</data>
<data name="net_sockets_blocking" xml:space="preserve">
<value>The operation is not allowed on a non-blocking Socket.</value>
</data>
<data name="net_sockets_useblocking" xml:space="preserve">
<value>Use the Blocking property to change the status of the Socket.</value>
</data>
<data name="net_sockets_select" xml:space="preserve">
<value>The operation is not allowed on objects of type {0}. Use only objects of type {1}.</value>
</data>
<data name="net_sockets_toolarge_select" xml:space="preserve">
<value>The {0} list contains too many items; a maximum of {1} is allowed.</value>
</data>
<data name="net_sockets_empty_select" xml:space="preserve">
<value>All lists are either null or empty.</value>
</data>
<data name="net_sockets_mustbind" xml:space="preserve">
<value>You must call the Bind method before performing this operation.</value>
</data>
<data name="net_sockets_mustlisten" xml:space="preserve">
<value>You must call the Listen method before performing this operation.</value>
</data>
<data name="net_sockets_mustnotlisten" xml:space="preserve">
<value>You may not perform this operation after calling the Listen method.</value>
</data>
<data name="net_sockets_mustnotbebound" xml:space="preserve">
<value>The socket must not be bound or connected.</value>
</data>
<data name="net_sockets_namedmustnotbebound" xml:space="preserve">
<value>{0}: The socket must not be bound or connected.</value>
</data>
<data name="net_sockets_invalid_ipaddress_length" xml:space="preserve">
<value>The number of specified IP addresses has to be greater than 0.</value>
</data>
<data name="net_sockets_invalid_optionValue" xml:space="preserve">
<value>The specified value is not a valid '{0}'.</value>
</data>
<data name="net_sockets_invalid_optionValue_all" xml:space="preserve">
<value>The specified value is not valid.</value>
</data>
<data name="net_sockets_invalid_dnsendpoint" xml:space="preserve">
<value>The parameter {0} must not be of type DnsEndPoint.</value>
</data>
<data name="net_sockets_disconnectedConnect" xml:space="preserve">
<value>Once the socket has been disconnected, you can only reconnect again asynchronously, and only to a different EndPoint. BeginConnect must be called on a thread that won't exit until the operation has been completed.</value>
</data>
<data name="net_sockets_disconnectedAccept" xml:space="preserve">
<value>Once the socket has been disconnected, you can only accept again asynchronously. BeginAccept must be called on a thread that won't exit until the operation has been completed.</value>
</data>
<data name="net_tcplistener_mustbestopped" xml:space="preserve">
<value>The TcpListener must not be listening before performing this operation.</value>
</data>
<data name="net_socketopinprogress" xml:space="preserve">
<value>An asynchronous socket operation is already in progress using this SocketAsyncEventArgs instance.</value>
</data>
<data name="net_buffercounttoosmall" xml:space="preserve">
<value>The Buffer space specified by the Count property is insufficient for the AcceptAsync method.</value>
</data>
<data name="net_multibuffernotsupported" xml:space="preserve">
<value>Multiple buffers cannot be used with this method.</value>
</data>
<data name="net_ambiguousbuffers" xml:space="preserve">
<value>Buffer and BufferList properties cannot both be non-null.</value>
</data>
<data name="net_io_writefailure" xml:space="preserve">
<value>Unable to write data to the transport connection: {0}.</value>
</data>
<data name="net_io_readfailure" xml:space="preserve">
<value>Unable to read data from the transport connection: {0}.</value>
</data>
<data name="net_io_connectionclosed" xml:space="preserve">
<value>The connection was closed</value>
</data>
<data name="net_io_invalidasyncresult" xml:space="preserve">
<value>The IAsyncResult object was not returned from the corresponding asynchronous method on this class.</value>
</data>
<data name="net_io_invalidendcall" xml:space="preserve">
<value>{0} can only be called once for each asynchronous operation.</value>
</data>
<data name="net_value_cannot_be_negative" xml:space="preserve">
<value>The specified value cannot be negative.</value>
</data>
<data name="net_log_exception" xml:space="preserve">
<value>Exception in {0}::{1} - {2}.</value>
</data>
<data name="net_log_socket_connected" xml:space="preserve">
<value>Created connection from {0} to {1}.</value>
</data>
<data name="event_Accepted" xml:space="preserve">
<value>Accepted connection from {0} to {1}.</value>
</data>
<data name="event_NotLoggedFile" xml:space="preserve">
<value>Not logging data from file: {0}.</value>
</data>
<data name="event_ConnectedAsyncDns" xml:space="preserve">
<value>Connecting to a DnsEndPoint.</value>
</data>
<data name="ArgumentOutOfRange_Bounds_Lower_Upper" xml:space="preserve">
<value>Argument must be between {0} and {1}.</value>
</data>
<data name="net_sockets_connect_multiaddress_notsupported" xml:space="preserve">
<value>This platform does not support connecting sockets to DNS endpoints via the instance Connect and ConnectAsync methods, due to the potential for a host name to map to multiple IP addresses and sockets becoming invalid for use after a failed connect attempt. Use the static ConnectAsync method, or provide to the instance methods the specific IPAddress desired.</value>
</data>
<data name="net_sockets_connect_multiconnect_notsupported" xml:space="preserve">
<value>Sockets on this platform are invalid for use after a failed connection attempt.</value>
</data>
<data name="net_sockets_dualmode_receivefrom_notsupported" xml:space="preserve">
<value>This platform does not support packet information for dual-mode sockets. If packet information is not required, use Socket.Receive. If packet information is required set Socket.DualMode to false.</value>
</data>
<data name="net_sockets_accept_receive_notsupported" xml:space="preserve">
<value>This platform does not support receiving data with Socket.AcceptAsync. Instead, make a separate call to Socket.ReceiveAsync.</value>
</data>
<data name="net_sockets_duplicateandclose_notsupported" xml:space="preserve">
<value>This platform does not support Socket.DuplicateAndClose. Instead, create a new socket.</value>
</data>
<data name="net_sockets_disconnect_notsupported" xml:space="preserve">
<value>This platform does not support disconnecting a Socket. Instead, close the Socket and create a new one.</value>
</data>
<data name="net_sockets_transmitfileoptions_notsupported" xml:space="preserve">
<value>This platform does not support TransmitFileOptions other than TransmitFileOptions.UseDefaultWorkerThread.</value>
</data>
<data name="NotSupported_UnreadableStream" xml:space="preserve">
<value>Stream does not support reading.</value>
</data>
<data name="NotSupported_UnwritableStream" xml:space="preserve">
<value>Stream does not support writing.</value>
</data>
<data name="ObjectDisposed_StreamClosed" xml:space="preserve">
<value>Can not access a closed Stream.</value>
</data>
<data name="ArgumentOutOfRange_NeedPosNum" xml:space="preserve">
<value>Positive number required.</value>
</data>
</root>

View File

@ -0,0 +1,477 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
<AssemblyName>System.Net.Sockets</AssemblyName>
<ProjectGuid>{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}</ProjectGuid>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<EnableWinRT Condition="'$(TargetGroup)' == 'netcore50'">true</EnableWinRT>
<IsPartialFacadeAssembly Condition="'$(TargetGroup)' == 'net463'">true</IsPartialFacadeAssembly>
<AssemblyVersion Condition="'$(TargetGroup)' == 'netcore50'">4.1.1.0</AssemblyVersion>
<DefineConstants Condition="'$(TargetGroup)' == 'netcore50'">$(DefineConstants);netcore50</DefineConstants>
</PropertyGroup>
<!-- Help VS understand available configurations -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netcore50-Windows_NT-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netcore50-Windows_NT-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netcoreapp-Unix-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netcoreapp-Unix-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netcoreapp-Windows_NT-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netcoreapp-Windows_NT-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='net463-Windows_NT-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='net463-Windows_NT-Release|AnyCPU'" />
<PropertyGroup>
<!-- SYSTEM_NET_SOCKETS_DLL is required to allow source-level code sharing for types defined within the
System.Net.Internals namespace. -->
<DefineConstants>$(DefineConstants);SYSTEM_NET_SOCKETS_DLL</DefineConstants>
</PropertyGroup>
<ItemGroup>
<!-- All configurations -->
<Compile Include="System\Net\Sockets\TransmitFileOptions.cs" />
<Compile Include="System\Net\Sockets\SocketReceiveFromResult.cs" />
<Compile Include="System\Net\Sockets\SocketReceiveMessageFromResult.cs" />
<Compile Include="System\Net\Sockets\SocketTaskExtensions.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp' or '$(TargetGroup)' == 'netcore50'">
<!-- CoreCLR (All Operating Systems), .NET Native -->
<Compile Include="System\Net\DnsAPMExtensions.cs" />
<Compile Include="System\Net\SocketPerfCounters.cs" />
<Compile Include="System\Net\Sockets\IOControlCode.cs" />
<Compile Include="System\Net\Sockets\IPPacketInformation.cs" />
<Compile Include="System\Net\Sockets\IPProtectionLevel.cs" />
<Compile Include="System\Net\Sockets\LingerOption.cs" />
<Compile Include="System\Net\Sockets\MulticastOption.cs" />
<Compile Include="System\Net\Sockets\NetEventSource.Sockets.cs" />
<Compile Include="System\Net\Sockets\NetworkStream.cs" />
<Compile Include="System\Net\Sockets\SelectMode.cs" />
<Compile Include="System\Net\Sockets\SendPacketsElement.cs" />
<Compile Include="System\Net\Sockets\Socket.cs" />
<Compile Include="System\Net\Sockets\SocketAsyncEventArgs.cs" />
<Compile Include="System\Net\Sockets\SocketAsyncOperation.cs" />
<Compile Include="System\Net\Sockets\SocketFlags.cs" />
<Compile Include="System\Net\Sockets\SocketInformationOptions.cs" />
<Compile Include="System\Net\Sockets\SocketInformation.cs" />
<Compile Include="System\Net\Sockets\SocketOptionLevel.cs" />
<Compile Include="System\Net\Sockets\SocketOptionName.cs" />
<Compile Include="System\Net\Sockets\SocketShutdown.cs" />
<Compile Include="System\Net\Sockets\TCPClient.cs" />
<Compile Condition="'$(TargetGroup)' != 'netcore50'" Include="System\Net\Sockets\TCPClient.netstandard.cs" />
<Compile Include="System\Net\Sockets\TCPListener.cs" />
<Compile Include="System\Net\Sockets\TransportType.cs" />
<Compile Include="System\Net\Sockets\UDPClient.cs" />
<Compile Condition="'$(TargetGroup)' != 'netcore50'" Include="System\Net\Sockets\UDPClient.netstandard.cs" />
<Compile Include="System\Net\Sockets\UdpReceiveResult.cs" />
<Compile Include="System\Net\Sockets\AcceptOverlappedAsyncResult.cs" />
<Compile Include="System\Net\Sockets\BaseOverlappedAsyncResult.cs" />
<Compile Include="System\Net\Sockets\ConnectOverlappedAsyncResult.cs" />
<Compile Include="System\Net\Sockets\DisconnectOverlappedAsyncResult.cs" />
<Compile Include="System\Net\Sockets\MultipleConnectAsync.cs" />
<Compile Include="System\Net\Sockets\OverlappedAsyncResult.cs" />
<Compile Include="System\Net\Sockets\ReceiveMessageOverlappedAsyncResult.cs" />
<Compile Include="$(CommonPath)\System\IO\StreamHelpers.CopyValidation.cs">
<Link>Common\System\IO\StreamHelpers.CopyValidation.cs</Link>
</Compile>
<!-- Logging -->
<Compile Include="$(CommonPath)\System\Net\Logging\DebugThreadTracking.cs">
<Link>Common\System\Net\Logging\DebugThreadTracking.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\Logging\NetEventSource.Common.cs">
<Link>Common\System\Net\Logging\NetEventSource.Common.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\InternalException.cs">
<Link>Common\System\Net\InternalException.cs</Link>
</Compile>
<!-- Debug only -->
<Compile Include="$(CommonPath)\System\Net\DebugSafeHandle.cs">
<Link>Common\System\Net\DebugSafeHandle.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\DebugSafeHandleMinusOneIsInvalid.cs">
<Link>Common\System\Net\DebugSafeHandleMinusOneIsInvalid.cs</Link>
</Compile>
<!-- System.Net common -->
<Compile Include="$(CommonPath)\System\Net\ContextAwareResult.cs">
<Link>Common\System\Net\ContextAwareResult.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\LazyAsyncResult.cs">
<Link>Common\System\Net\LazyAsyncResult.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\ByteOrder.cs">
<Link>Common\System\Net\ByteOrder.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\IPEndPointStatics.cs">
<Link>Common\System\Net\IPEndPointStatics.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\IPAddressParserStatics.cs">
<Link>Common\System\Net\IPAddressParserStatics.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\ExceptionCheck.cs">
<Link>Common\System\Net\ExceptionCheck.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\RangeValidationHelpers.cs">
<Link>Common\System\Net\RangeValidationHelpers.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\SafeCloseSocket.cs">
<Link>Common\System\Net\SafeCloseSocket.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\SocketAddress.cs">
<Link>Common\System\Net\SocketAddress.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\TcpValidationHelpers.cs">
<Link>Common\System\Net\TcpValidationHelpers.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\NetworkInformation\StartIPOptions.cs">
<Link>Common\System\Net\NetworkInformation\StartIPOptions.cs</Link>
</Compile>
<!-- System.Net.Internals -->
<Compile Include="$(CommonPath)\System\Net\Internals\IPEndPointExtensions.cs">
<Link>Common\System\Net\Internals\IPEndPointExtensions.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\Internals\IPAddressExtensions.cs">
<Link>Common\System\Net\Internals\IPAddressExtensions.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\Internals\SocketExceptionFactory.cs">
<Link>Common\System\Net\Internals\SocketExceptionFactory.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\Sockets\ProtocolFamily.cs">
<Link>Common\System\Net\Sockets\ProtocolFamily.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\Sockets\ProtocolType.cs">
<Link>Common\System\Net\Sockets\ProtocolType.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\Sockets\SocketType.cs">
<Link>Common\System\Net\Sockets\SocketType.cs</Link>
</Compile>
<!-- Common -->
<Compile Include="$(CommonPath)\System\Threading\Tasks\TaskToApm.cs">
<Link>Common\System\Threading\Tasks\TaskToApm.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup Condition=" '$(TargetsWindows)' == 'true' AND ('$(TargetGroup)' == 'netcoreapp' or '$(TargetGroup)' == 'netcore50')">
<!-- Windows: CoreCLR and .NET Native -->
<Compile Include="System\Net\Sockets\AcceptOverlappedAsyncResult.Windows.cs" />
<Compile Include="System\Net\Sockets\BaseOverlappedAsyncResult.Windows.cs" />
<Compile Include="System\Net\Sockets\ConnectOverlappedAsyncResult.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\SendPacketsElementFlags.Windows.cs" />
<Compile Include="System\Net\Sockets\Socket.Windows.cs" />
<Compile Include="System\Net\Sockets\SocketAsyncEventArgs.Windows.cs" />
<Compile Include="System\Net\Sockets\SocketPal.Windows.cs" />
<Compile Include="System\Net\Sockets\TCPClient.Windows.cs" />
<Compile Include="System\Net\Sockets\TransmitFileAsyncResult.Windows.cs" />
<Compile Condition="'$(TargetGroup)' != 'netcore50'" Include="System\Net\Sockets\TCPClient.Windows.netstandard.cs" />
<Compile Include="$(CommonPath)\System\Net\SafeCloseSocket.Windows.cs">
<Link>Common\System\Net\SafeCloseSocket.Windows.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\SocketAddressPal.Windows.cs">
<Link>Common\System\Net\SocketAddressPal.Windows.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\SocketProtocolSupportPal.Windows.cs">
<Link>Common\System\Net\SocketProtocolSupportPal.Windows</Link>
</Compile>
<!-- Interop -->
<Compile Include="$(CommonPath)\Interop\Windows\Interop.Libraries.cs">
<Link>Interop\Windows\Interop.Libraries.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.accept.cs">
<Link>Interop\Windows\Winsock\Interop.accept.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.bind.cs">
<Link>Interop\Windows\Winsock\Interop.bind.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.closesocket.cs">
<Link>Interop\Windows\Winsock\Interop.closesocket.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.getpeername.cs">
<Link>Interop\Windows\Winsock\Interop.getpeername.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.getsockname.cs">
<Link>Interop\Windows\Winsock\Interop.getsockname.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.getsockopt.cs">
<Link>Interop\Windows\Winsock\Interop.getsockopt.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.ioctlsocket.cs">
<Link>Interop\Windows\Winsock\Interop.ioctlsocket.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.listen.cs">
<Link>Interop\Windows\Winsock\Interop.listen.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.recv.cs">
<Link>Interop\Windows\Winsock\Interop.recv.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.recvfrom.cs">
<Link>Interop\Windows\Winsock\Interop.recvfrom.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.select.cs">
<Link>Interop\Windows\Winsock\Interop.select.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.send.cs">
<Link>Interop\Windows\Winsock\Interop.send.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.sendto.cs">
<Link>Interop\Windows\Winsock\Interop.sendto.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.setsockopt.cs">
<Link>Interop\Windows\Winsock\Interop.setsockopt.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.shutdown.cs">
<Link>Interop\Windows\Winsock\Interop.shutdown.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.TransmitFile.cs">
<Link>Interop\Windows\Winsock\Interop.TransmitFile.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.WinsockBSD.cs">
<Link>Interop\Windows\Winsock\Interop.WinsockBSD.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.WinsockAsync.cs">
<Link>Interop\Windows\Winsock\Interop.WinsockAsync.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.WSAConnect.cs">
<Link>Interop\Windows\Winsock\Interop.WSAConnect.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.WSAEnumNetworkEvents.cs">
<Link>Interop\Windows\Winsock\Interop.WSAEnumNetworkEvents.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.WSAEventSelect.cs">
<Link>Interop\Windows\Winsock\Interop.WSAEventSelect.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.WSAGetOverlappedResult.cs">
<Link>Interop\Windows\Winsock\Interop.WSAGetOverlappedResult.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.WSAIoctl.cs">
<Link>Interop\Windows\Winsock\Interop.WSAIoctl.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.WSARecv.cs">
<Link>Interop\Windows\Winsock\Interop.WSARecv.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.WSARecvFrom.cs">
<Link>Interop\Windows\Winsock\Interop.WSARecvFrom.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.WSASend.cs">
<Link>Interop\Windows\Winsock\Interop.WSASend.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.WSASendTo.cs">
<Link>Interop\Windows\Winsock\Interop.WSASendTo.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.WSASocketW.cs">
<Link>Interop\Windows\Winsock\Interop.WSASocketW.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.WSASocketW.SafeCloseSocket.cs">
<Link>Interop\Windows\Winsock\Interop.WSASocketW.SafeCloseSocket.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\SafeNativeOverlapped.cs">
<Link>Interop\Windows\Winsock\SafeNativeOverlapped.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\WSABuffer.cs">
<Link>Interop\Windows\Winsock\WSABuffer.cs</Link>
</Compile>
</ItemGroup>
<!-- Windows : Win32 only -->
<ItemGroup Condition="'$(TargetsWindows)' == 'true' AND '$(EnableWinRT)' != 'true' AND ('$(TargetGroup)' == 'netcoreapp' or '$(TargetGroup)' == 'netcore50')">
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\SafeOverlappedFree.cs">
<Link>Interop\Windows\Winsock\SafeOverlappedFree.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.LocalAlloc_SafeOverlappedFree.cs">
<Link>Interop\Windows\kernel32\Interop.LocalAlloc_SafeOverlappedFree.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.LocalAlloc.Constants.cs">
<Link>Common\Interop\Windows\kernel32\Interop.LocalAlloc.Constants.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.LocalFree.cs">
<Link>Common\Interop\Windows\kernel32\Interop.LocalFree.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.SetFileCompletionNotificationModes.cs">
<Link>Interop\Windows\kernel32\Interop.SetFileCompletionNotificationModes.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\ContextAwareResult.Windows.cs">
<Link>Common\System\Net\ContextAwareResult.Windows.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\CompletionPortHelper.Windows.cs">
<Link>Common\System\Net\CompletionPortHelper.Windows.cs</Link>
</Compile>
</ItemGroup>
<!-- Windows : Win32 + WinRT -->
<ItemGroup Condition="'$(TargetsWindows)' == 'true' AND '$(EnableWinRT)' == 'true'">
<Compile Include="$(CommonPath)\System\Net\ContextAwareResult.Uap.cs">
<Link>Common\System\Net\ContextAwareResult.Uap.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\CompletionPortHelper.Uap.cs">
<Link>Common\System\Net\CompletionPortHelper.Uap.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup Condition=" '$(TargetsUnix)' == 'true' ">
<Compile Include="System\Net\Sockets\AcceptOverlappedAsyncResult.Unix.cs" />
<Compile Include="System\Net\Sockets\BaseOverlappedAsyncResult.Unix.cs" />
<Compile Include="System\Net\Sockets\ConnectOverlappedAsyncResult.Unix.cs" />
<Compile Include="System\Net\Sockets\OverlappedAsyncResult.Unix.cs" />
<Compile Include="System\Net\Sockets\ReceiveMessageOverlappedAsyncResult.Unix.cs" />
<Compile Include="System\Net\Sockets\SendPacketsElementFlags.Unix.cs" />
<Compile Include="System\Net\Sockets\Socket.Unix.cs" />
<Compile Include="System\Net\Sockets\SocketAsyncContext.Unix.cs" />
<Compile Include="System\Net\Sockets\SocketAsyncEngine.Unix.cs" />
<Compile Include="System\Net\Sockets\SocketAsyncEventArgs.Unix.cs" />
<Compile Include="System\Net\Sockets\SocketPal.Unix.cs" />
<Compile Include="System\Net\Sockets\TCPClient.Unix.cs" />
<Compile Condition="'$(TargetGroup)' != 'netcore50'" Include="System\Net\Sockets\TCPClient.Unix.netstandard.cs" />
<Compile Include="$(CommonPath)\System\Net\ContextAwareResult.Unix.cs">
<Link>Common\System\Net\ContextAwareResult.Unix.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\InteropIPAddressExtensions.Unix.cs">
<Link>Common\System\Net\InteropIPAddressExtensions.Unix.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\SafeCloseSocket.Unix.cs">
<Link>Common\System\Net\SafeCloseSocket.Unix.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\SocketAddressPal.Unix.cs">
<Link>Common\System\Net\SocketAddressPal.Unix.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\SocketProtocolSupportPal.Unix.cs">
<Link>Common\System\Net\SocketProtocolSupportPal.Unix</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\Sockets\SocketErrorPal.Unix.cs">
<Link>Common\System\Net\Sockets\SocketErrorPal.Unix</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Interop.CheckedAccess.cs">
<Link>Common\Interop\Interop.CheckedAccess.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\Interop.Errors.cs">
<Link>Common\Interop\Unix\Interop.Errors.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\Interop.Libraries.cs">
<Link>Interop\Unix\Interop.Libraries.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.Accept.cs">
<Link>Interop\Unix\System.Native\Interop.Accept.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.Bind.cs">
<Link>Interop\Unix\System.Native\Interop.Bind.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.Close.cs">
<Link>Interop\Unix\System.Native\Interop.Close.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.Connect.cs">
<Link>Interop\Unix\System.Native\Interop.Connect.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.Fcntl.cs">
<Link>Interop\Unix\System.Native\Interop.Fcntl.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.GetBytesAvailable.cs">
<Link>Interop\Unix\System.Native\Interop.GetBytesAvailable.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.GetPeerName.cs">
<Link>Interop\Unix\System.Native\Interop.GetPeerName.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.GetSocketErrorOption.cs">
<Link>Interop\Unix\System.Native\Interop.GetSocketErrorOption.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.GetSockName.cs">
<Link>Interop\Unix\System.Native\Interop.GetSockName.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.GetSockOpt.cs">
<Link>Interop\Unix\System.Native\Interop.GetSockOpt.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.IPAddress.cs">
<Link>Interop\Unix\System.Native\Interop.IPAddress.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.IPPacketInformation.cs">
<Link>Interop\Unix\System.Native\Interop.IPPacketInformation.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.LingerOption.cs">
<Link>Interop\Unix\System.Native\Interop.LingerOption.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.SendFile.cs">
<Link>Interop\Unix\System.Native\Interop.SendFile.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.SetSendTimeout.cs">
<Link>Interop\Unix\System.Native\Interop.SetSendTimeout.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.SetReceiveTimeout.cs">
<Link>Interop\Unix\System.Native\Interop.SetReceiveTimeout.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.Listen.cs">
<Link>Interop\Unix\System.Native\Interop.Listen.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.MemSet.cs">
<Link>Interop\Unix\System.Native\Interop.MemSet.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.MessageHeader.cs">
<Link>Interop\Unix\System.Native\Interop.MessageHeader.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.MulticastOption.cs">
<Link>Interop\Unix\System.Native\Interop.MulticastOption.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.Poll.cs">
<Link>Interop\Unix\System.Native\Interop.Poll.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.PlatformSocketSupport.cs">
<Link>Interop\Unix\System.Native\Interop.PlatformSocketSupport.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.ReceiveMessage.cs">
<Link>Interop\Unix\System.Native\Interop.ReceiveMessage.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.SendMessage.cs">
<Link>Interop\Unix\System.Native\Interop.SendMessage.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.SetSockOpt.cs">
<Link>Interop\Unix\System.Native\Interop.SetSockOpt.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.Shutdown.cs">
<Link>Interop\Unix\System.Native\Interop.Shutdown.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.Socket.cs">
<Link>Interop\Unix\System.Native\Interop.Socket.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.SocketEvent.cs">
<Link>Interop\Unix\System.Native\Interop.SocketEvent.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.SocketAddress.cs">
<Link>Interop\Unix\System.Native\Interop.SocketAddress.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.Pipe.cs">
<Link>Interop\Unix\System.Native\Interop.Pipe.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.Write.cs">
<Link>Interop\Unix\System.Native\Interop.Write.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'netcore50'">
<Compile Include="$(CommonPath)\Microsoft\Win32\SafeHandles\SafeHandleZeroOrMinusOneIsInvalid.cs">
<Link>Common\Microsoft\Win32\SafeHandles\SafeHandleZeroOrMinusOneIsInvalid.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Microsoft\Win32\SafeHandles\SafeHandleMinusOneIsInvalid.cs">
<Link>Common\Microsoft\Win32\SafeHandles\SafeHandleMinusOneIsInvalid.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\Shims\DBNull.cs">
<Link>Common\System\Net\Shims\DBNull.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'net463'">
<!-- .NET Framework -->
<TargetingPackReference Include="mscorlib" />
<TargetingPackReference Include="System" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.Win32.Primitives" />
<Reference Include="System.Buffers" />
<Reference Include="System.Collections" />
<Reference Include="System.Diagnostics.Debug" />
<Reference Include="System.Diagnostics.Tracing" />
<Reference Include="System.IO.FileSystem" />
<Reference Include="System.Net.NameResolution" />
<Reference Include="System.Net.Primitives" />
<Reference Include="System.Resources.ResourceManager" />
<Reference Include="System.Runtime" />
<Reference Include="System.Runtime.Extensions" />
<Reference Include="System.Runtime.InteropServices" />
<Reference Include="System.Security.Claims" />
<Reference Include="System.Security.Principal.Windows" />
<Reference Include="System.Threading" />
<Reference Include="System.Threading.Overlapped" />
<Reference Include="System.Threading.Tasks" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsUnix)' == 'true'">
<Reference Include="System.Threading.ThreadPool" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>

View File

@ -0,0 +1,21 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Threading.Tasks;
namespace System.Net.Sockets
{
internal static class DnsAPMExtensions
{
public static IAsyncResult BeginGetHostAddresses(string hostNameOrAddress, AsyncCallback requestCallback, object state)
{
return TaskToApm.Begin(Dns.GetHostAddressesAsync(hostNameOrAddress), requestCallback, state);
}
public static IPAddress[] EndGetHostAddresses(IAsyncResult asyncResult)
{
return TaskToApm.End<IPAddress[]>(asyncResult);
}
}
}

View File

@ -0,0 +1,60 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Threading;
namespace System.Net
{
internal enum SocketPerfCounterName
{
SocketConnectionsEstablished = 0, // these enum values are used as index
SocketBytesReceived,
SocketBytesSent,
SocketDatagramsReceived,
SocketDatagramsSent,
}
internal sealed class SocketPerfCounter
{
private static SocketPerfCounter s_instance;
private static object s_lockObject = new object();
public static SocketPerfCounter Instance
{
get
{
if (Volatile.Read(ref s_instance) == null)
{
lock (s_lockObject)
{
if (Volatile.Read(ref s_instance) == null)
{
s_instance = new SocketPerfCounter();
}
}
}
return s_instance;
}
}
public bool Enabled
{
get
{
// TODO (#7833): Implement socket perf counters.
return false;
}
}
public void Increment(SocketPerfCounterName perfCounter)
{
// TODO (#7833): Implement socket perf counters.
}
public void Increment(SocketPerfCounterName perfCounter, long amount)
{
// TODO (#7833): Implement socket perf counters.
}
}
}

View File

@ -0,0 +1,53 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Diagnostics;
using System.Net;
using System.Runtime.InteropServices;
using System.Threading;
using Microsoft.Win32;
namespace System.Net.Sockets
{
// AcceptOverlappedAsyncResult - used to take care of storage for async Socket BeginAccept call.
internal sealed partial class AcceptOverlappedAsyncResult : BaseOverlappedAsyncResult
{
private Socket _acceptedSocket;
internal Socket AcceptSocket
{
set
{
// *nix does not support the reuse of an existing socket as the accepted
// socket.
Debug.Assert(value == null, $"Unexpected value: {value}");
}
}
public void CompletionCallback(IntPtr acceptedFileDescriptor, byte[] socketAddress, int socketAddressLen, SocketError errorCode)
{
_buffer = null;
_numBytes = 0;
if (errorCode == SocketError.Success)
{
Internals.SocketAddress remoteSocketAddress = IPEndPointExtensions.Serialize(_listenSocket._rightEndPoint);
System.Buffer.BlockCopy(socketAddress, 0, remoteSocketAddress.Buffer, 0, socketAddressLen);
_acceptedSocket = _listenSocket.CreateAcceptSocket(
SafeCloseSocket.CreateSocket(acceptedFileDescriptor),
_listenSocket._rightEndPoint.Create(remoteSocketAddress));
}
base.CompletionCallback(0, errorCode);
}
internal override object PostCompletion(int numBytes)
{
_numBytes = numBytes;
return (SocketError)ErrorCode == SocketError.Success ? _acceptedSocket : null;
}
}
}

View File

@ -0,0 +1,124 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Diagnostics;
using System.Net;
using System.Runtime.InteropServices;
using System.Threading;
using Microsoft.Win32;
namespace System.Net.Sockets
{
// AcceptOverlappedAsyncResult - used to take care of storage for async Socket BeginAccept call.
internal sealed partial class AcceptOverlappedAsyncResult : BaseOverlappedAsyncResult
{
private Socket _acceptSocket;
private int _addressBufferLength;
// This method will be called by us when the IO completes synchronously and
// by the ThreadPool when the IO completes asynchronously. (only called on WinNT)
internal override object PostCompletion(int numBytes)
{
SocketError errorCode = (SocketError)ErrorCode;
Internals.SocketAddress remoteSocketAddress = null;
if (errorCode == SocketError.Success)
{
_numBytes = numBytes;
if (NetEventSource.IsEnabled) LogBuffer(numBytes);
// get the endpoint
remoteSocketAddress = IPEndPointExtensions.Serialize(_listenSocket._rightEndPoint);
IntPtr localAddr;
int localAddrLength;
IntPtr remoteAddr;
// set the socket context
try
{
_listenSocket.GetAcceptExSockaddrs(
Marshal.UnsafeAddrOfPinnedArrayElement(_buffer, 0),
_buffer.Length - (_addressBufferLength * 2),
_addressBufferLength,
_addressBufferLength,
out localAddr,
out localAddrLength,
out remoteAddr,
out remoteSocketAddress.InternalSize);
Marshal.Copy(remoteAddr, remoteSocketAddress.Buffer, 0, remoteSocketAddress.Size);
IntPtr handle = _listenSocket.SafeHandle.DangerousGetHandle();
errorCode = Interop.Winsock.setsockopt(
_acceptSocket.SafeHandle,
SocketOptionLevel.Socket,
SocketOptionName.UpdateAcceptContext,
ref handle,
Marshal.SizeOf(handle));
if (errorCode == SocketError.SocketError)
{
errorCode = SocketPal.GetLastSocketError();
}
if (NetEventSource.IsEnabled) NetEventSource.Info(this, $"setsockopt handle:{handle}, AcceptSocket:{_acceptSocket}, returns:{errorCode}");
}
catch (ObjectDisposedException)
{
errorCode = SocketError.OperationAborted;
}
ErrorCode = (int)errorCode;
}
if (errorCode != SocketError.Success)
{
return null;
}
return _listenSocket.UpdateAcceptSocket(_acceptSocket, _listenSocket._rightEndPoint.Create(remoteSocketAddress));
}
// SetUnmanagedStructures
//
// This method fills in overlapped structures used in an asynchronous
// overlapped Winsock call. These calls are outside the runtime and are
// unmanaged code, so we need to prepare specific structures and ints that
// lie in unmanaged memory since the overlapped calls may complete asynchronously.
internal void SetUnmanagedStructures(byte[] buffer, int addressBufferLength)
{
// has to be called first to pin memory
base.SetUnmanagedStructures(buffer);
// Fill in Buffer Array structure that will be used for our send/recv Buffer
_addressBufferLength = addressBufferLength;
_buffer = buffer;
}
private void LogBuffer(long size)
{
if (!NetEventSource.IsEnabled) return;
if (size > -1)
{
NetEventSource.DumpBuffer(this, _buffer, 0, Math.Min((int)size, _buffer.Length));
}
else
{
NetEventSource.DumpBuffer(this, _buffer);
}
}
internal Socket AcceptSocket
{
set
{
_acceptSocket = value;
}
}
}
}

View File

@ -0,0 +1,41 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Net;
using System.Runtime.InteropServices;
using System.Threading;
using Microsoft.Win32;
namespace System.Net.Sockets
{
// AcceptOverlappedAsyncResult - used to take care of storage for async Socket BeginAccept call.
internal sealed partial class AcceptOverlappedAsyncResult : BaseOverlappedAsyncResult
{
private Socket _listenSocket;
private byte[] _buffer;
internal AcceptOverlappedAsyncResult(Socket listenSocket, Object asyncState, AsyncCallback asyncCallback) :
base(listenSocket, asyncState, asyncCallback)
{
_listenSocket = listenSocket;
}
internal byte[] Buffer
{
get
{
return _buffer;
}
}
internal int BytesTransferred
{
get
{
return _numBytes;
}
}
}
}

View File

@ -0,0 +1,32 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Diagnostics;
using System.Net;
using System.Runtime.InteropServices;
using System.Threading;
using Microsoft.Win32;
namespace System.Net.Sockets
{
// BaseOverlappedAsyncResult
//
// This class is used to track state for async Socket operations such as the BeginSend, BeginSendTo,
// BeginReceive, BeginReceiveFrom, BeginSendFile, and BeginAccept calls.
internal partial class BaseOverlappedAsyncResult : ContextAwareResult
{
public BaseOverlappedAsyncResult(Socket socket, Object asyncState, AsyncCallback asyncCallback)
: base(socket, asyncState, asyncCallback)
{
if (NetEventSource.IsEnabled) NetEventSource.Info(this, socket);
}
protected void CompletionCallback(int numBytes, SocketError errorCode)
{
ErrorCode = (int)errorCode;
InvokeCallback(PostCompletion(numBytes));
}
}
}

View File

@ -0,0 +1,229 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Diagnostics;
using System.Net;
using System.Runtime.InteropServices;
using System.Threading;
using Microsoft.Win32;
namespace System.Net.Sockets
{
// BaseOverlappedAsyncResult
//
// This class is used to track state for async Socket operations such as the BeginSend, BeginSendTo,
// BeginReceive, BeginReceiveFrom, BeginSendFile, and BeginAccept calls.
internal partial class BaseOverlappedAsyncResult : ContextAwareResult
{
private int _cleanupCount;
private SafeNativeOverlapped _nativeOverlapped;
// The WinNT Completion Port callback.
private static unsafe readonly IOCompletionCallback s_ioCallback = new IOCompletionCallback(CompletionPortCallback);
internal BaseOverlappedAsyncResult(Socket socket, Object asyncState, AsyncCallback asyncCallback)
: base(socket, asyncState, asyncCallback)
{
_cleanupCount = 1;
if (NetEventSource.IsEnabled) NetEventSource.Info(this, socket);
}
// SetUnmanagedStructures
//
// This needs to be called for overlapped IO to function properly.
//
// Fills in overlapped Structures used in an async overlapped Winsock call.
// These calls are outside the runtime and are unmanaged code, so we need
// to prepare specific structures and ints that lie in unmanaged memory
// since the overlapped calls may complete asynchronously.
internal void SetUnmanagedStructures(object objectsToPin)
{
Socket s = (Socket)AsyncObject;
// Bind the Win32 Socket Handle to the ThreadPool
Debug.Assert(s != null, "m_CurrentSocket is null");
Debug.Assert(s.SafeHandle != null, "m_CurrentSocket.SafeHandle is null");
if (s.SafeHandle.IsInvalid)
{
throw new ObjectDisposedException(s.GetType().FullName);
}
ThreadPoolBoundHandle boundHandle = s.GetOrAllocateThreadPoolBoundHandle();
unsafe
{
NativeOverlapped* overlapped = boundHandle.AllocateNativeOverlapped(s_ioCallback, this, objectsToPin);
_nativeOverlapped = new SafeNativeOverlapped(s.SafeHandle, overlapped);
}
if (NetEventSource.IsEnabled) NetEventSource.Info(this, $"{boundHandle}::AllocateNativeOverlapped. return={_nativeOverlapped}");
}
private static unsafe void CompletionPortCallback(uint errorCode, uint numBytes, NativeOverlapped* nativeOverlapped)
{
#if DEBUG
DebugThreadTracking.SetThreadSource(ThreadKinds.CompletionPort);
using (DebugThreadTracking.SetThreadKind(ThreadKinds.System))
{
#endif
BaseOverlappedAsyncResult asyncResult = (BaseOverlappedAsyncResult)ThreadPoolBoundHandle.GetNativeOverlappedState(nativeOverlapped);
if (asyncResult.InternalPeekCompleted)
{
NetEventSource.Fail(null, $"asyncResult.IsCompleted: {asyncResult}");
}
if (NetEventSource.IsEnabled) NetEventSource.Info(null, $"errorCode:{errorCode} numBytes:{numBytes} nativeOverlapped:{(IntPtr)nativeOverlapped}");
// Complete the IO and invoke the user's callback.
SocketError socketError = (SocketError)errorCode;
if (socketError != SocketError.Success && socketError != SocketError.OperationAborted)
{
// There are cases where passed errorCode does not reflect the details of the underlined socket error.
// "So as of today, the key is the difference between WSAECONNRESET and ConnectionAborted,
// .e.g remote party or network causing the connection reset or something on the local host (e.g. closesocket
// or receiving data after shutdown (SD_RECV)). With Winsock/TCP stack rewrite in longhorn, there may
// be other differences as well."
Socket socket = asyncResult.AsyncObject as Socket;
if (socket == null)
{
socketError = SocketError.NotSocket;
}
else if (socket.CleanedUp)
{
socketError = SocketError.OperationAborted;
}
else
{
try
{
// The async IO completed with a failure.
// Here we need to call WSAGetOverlappedResult() just so GetLastSocketError() will return the correct error.
SocketFlags ignore;
bool success = Interop.Winsock.WSAGetOverlappedResult(
socket.SafeHandle,
asyncResult._nativeOverlapped,
out numBytes,
false,
out ignore);
if (!success)
{
socketError = SocketPal.GetLastSocketError();
}
if (success)
{
NetEventSource.Fail(asyncResult, $"Unexpectedly succeeded. errorCode:{errorCode} numBytes:{numBytes}");
}
}
catch (ObjectDisposedException)
{
// CleanedUp check above does not always work since this code is subject to race conditions
socketError = SocketError.OperationAborted;
}
}
}
// Set results and invoke callback
asyncResult.CompletionCallback((int)numBytes, socketError);
#if DEBUG
}
#endif
}
// Called either synchronously from SocketPal async routines or asynchronously via CompletionPortCallback above.
private void CompletionCallback(int numBytes, SocketError socketError)
{
ReleaseUnmanagedStructures();
ErrorCode = (int)socketError;
InvokeCallback(PostCompletion(numBytes));
}
// The following property returns the Win32 unsafe pointer to
// whichever Overlapped structure we're using for IO.
internal SafeHandle OverlappedHandle
{
get
{
// On WinNT we need to use (due to the current implementation)
// an Overlapped object in order to bind the socket to the
// ThreadPool's completion port, so return the native handle
return _nativeOverlapped == null ? SafeNativeOverlapped.Zero : _nativeOverlapped;
}
}
// Check the result of the overlapped operation.
// Handle synchronous success by completing the asyncResult here.
// Handle synchronous failure by cleaning up and returning a SocketError.
internal SocketError ProcessOverlappedResult(bool success, int bytesTransferred)
{
if (success)
{
// Synchronous success.
Socket socket = (Socket)AsyncObject;
if (socket.SafeHandle.SkipCompletionPortOnSuccess)
{
// The socket handle is configured to skip completion on success,
// so we can complete this asyncResult right now.
CompletionCallback(bytesTransferred, SocketError.Success);
return SocketError.Success;
}
// Socket handle is going to post a completion to the completion port (may have done so already).
// Return pending and we will continue in the completion port callback.
return SocketError.IOPending;
}
// Get the socket error (which may be IOPending)
SocketError errorCode = SocketPal.GetLastSocketError();
if (errorCode == SocketError.IOPending)
{
// Operation is pending.
// We will continue when the completion arrives (may have already at this point).
return SocketError.IOPending;
}
// Synchronous failure.
// Release overlapped and pinned structures.
ReleaseUnmanagedStructures();
return errorCode;
}
internal void ReleaseUnmanagedStructures()
{
if (Interlocked.Decrement(ref _cleanupCount) == 0)
{
ForceReleaseUnmanagedStructures();
}
}
protected override void Cleanup()
{
base.Cleanup();
// If we get all the way to here and it's still not cleaned up...
if (_cleanupCount > 0 && Interlocked.Exchange(ref _cleanupCount, 0) > 0)
{
ForceReleaseUnmanagedStructures();
}
}
// Utility cleanup routine. Frees the overlapped structure.
// This should be overridden to free pinned and unmanaged memory in the subclass.
// It needs to also be invoked from the subclass.
protected virtual void ForceReleaseUnmanagedStructures()
{
// Free the unmanaged memory if allocated.
if (NetEventSource.IsEnabled) NetEventSource.Enter(this);
_nativeOverlapped.Dispose();
_nativeOverlapped = null;
GC.SuppressFinalize(this);
}
}
}

View File

@ -0,0 +1,40 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Diagnostics;
using System.Net;
using System.Runtime.InteropServices;
using System.Threading;
using Microsoft.Win32;
namespace System.Net.Sockets
{
// BaseOverlappedAsyncResult
//
// This class is used to track state for async Socket operations such as the BeginSend, BeginSendTo,
// BeginReceive, BeginReceiveFrom, BeginSendFile, and BeginAccept calls.
internal partial class BaseOverlappedAsyncResult : ContextAwareResult
{
// Sentinel object passed to callers of PostCompletion to use as the
// "result" of this operation, in order to avoid boxing the actual result.
private static readonly object s_resultObjectSentinel = new object();
// The actual result (number of bytes transferred)
internal int _numBytes;
// PostCompletion returns the result object to be set before the user's callback is invoked.
internal virtual object PostCompletion(int numBytes)
{
_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;
}
}
}

View File

@ -0,0 +1,35 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Net;
using System.Runtime.InteropServices;
using System.Threading;
using Microsoft.Win32;
namespace System.Net.Sockets
{
// ConnectOverlappedAsyncResult - used to take care of storage for async Socket BeginConnect call.
internal sealed partial class ConnectOverlappedAsyncResult : BaseOverlappedAsyncResult
{
public void CompletionCallback(SocketError errorCode)
{
CompletionCallback(0, errorCode);
}
// This method is called by base.CompletionPortCallback base.OverlappedCallback as part of IO completion
internal override object PostCompletion(int numBytes)
{
var errorCode = (SocketError)ErrorCode;
if (errorCode == SocketError.Success)
{
var socket = (Socket)AsyncObject;
socket.SetToConnected();
return socket;
}
return null;
}
}
}

View File

@ -0,0 +1,55 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Net;
using System.Runtime.InteropServices;
using System.Threading;
using Microsoft.Win32;
namespace System.Net.Sockets
{
// ConnectOverlappedAsyncResult - used to take care of storage for async Socket BeginConnect call.
internal sealed partial class ConnectOverlappedAsyncResult : BaseOverlappedAsyncResult
{
// This method is called by base.CompletionPortCallback base.OverlappedCallback as part of IO completion
internal override object PostCompletion(int numBytes)
{
SocketError errorCode = (SocketError)ErrorCode;
Socket socket = (Socket)AsyncObject;
if (errorCode == SocketError.Success)
{
// Set the socket context.
try
{
errorCode = Interop.Winsock.setsockopt(
socket.SafeHandle,
SocketOptionLevel.Socket,
SocketOptionName.UpdateConnectContext,
null,
0);
if (errorCode == SocketError.SocketError)
{
errorCode = SocketPal.GetLastSocketError();
}
}
catch (ObjectDisposedException)
{
errorCode = SocketError.OperationAborted;
}
ErrorCode = (int)errorCode;
}
if (errorCode == SocketError.Success)
{
socket.SetToConnected();
return socket;
}
return null;
}
}
}

View File

@ -0,0 +1,29 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Net;
using System.Runtime.InteropServices;
using System.Threading;
using Microsoft.Win32;
namespace System.Net.Sockets
{
// ConnectOverlappedAsyncResult - used to take care of storage for async Socket BeginConnect call.
internal sealed partial class ConnectOverlappedAsyncResult : BaseOverlappedAsyncResult
{
private EndPoint _endPoint;
internal ConnectOverlappedAsyncResult(Socket socket, EndPoint endPoint, Object asyncState, AsyncCallback asyncCallback) :
base(socket, asyncState, asyncCallback)
{
_endPoint = endPoint;
}
internal EndPoint RemoteEndPoint
{
get { return _endPoint; }
}
}
}

Some files were not shown because too many files have changed in this diff Show More