Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Expose SocketsHttpHandler #26964

Merged
merged 3 commits into from
Feb 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions src/System.Net.Http/ref/System.Net.Http.cs
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,28 @@ public ReadOnlyMemoryContent(System.ReadOnlyMemory<byte> content) { }
protected override System.Threading.Tasks.Task SerializeToStreamAsync(System.IO.Stream stream, System.Net.TransportContext context) => throw null;
protected internal override bool TryComputeLength(out long length) => throw null;
}
public sealed class SocketsHttpHandler : HttpMessageHandler
{
public SocketsHttpHandler() { }
public bool AllowAutoRedirect { get { throw null; } set { } }
public System.Net.DecompressionMethods AutomaticDecompression { get { throw null; } set { } }
public System.Net.CookieContainer CookieContainer { get { throw null; } set { } }
public System.Net.ICredentials Credentials { get { throw null; } set { } }
public System.Net.ICredentials DefaultProxyCredentials { get { throw null; } set { } }
public int MaxAutomaticRedirections { get { throw null; } set { } }
public int MaxConnectionsPerServer { get { throw null; } set { } }
public int MaxResponseHeadersLength { get { throw null; } set { } }
public bool PreAuthenticate { get { throw null; } set { } }
public System.TimeSpan PooledConnectionIdleTimeout { get { throw null; } set { } }
public System.TimeSpan PooledConnectionLifetime { get { throw null; } set { } }
public System.Collections.Generic.IDictionary<string, object> Properties { get { throw null; } }
public System.Net.IWebProxy Proxy { get { throw null; } set { } }
public System.Net.Security.SslClientAuthenticationOptions SslOptions { get { throw null; } set { } }
public bool UseCookies { get { throw null; } set { } }
public bool UseProxy { get { throw null; } set { } }
protected override void Dispose(bool disposing) { }
protected internal override System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> SendAsync(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) { throw null; }
}
public partial class StreamContent : System.Net.Http.HttpContent
{
public StreamContent(System.IO.Stream content) { }
Expand Down
1 change: 1 addition & 0 deletions src/System.Net.Http/ref/System.Net.Http.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<ProjectReference Include="..\..\System.Threading.Tasks\ref\System.Threading.Tasks.csproj" />
<ProjectReference Include="..\..\System.IO\ref\System.IO.csproj" />
<ProjectReference Include="..\..\System.Net.Primitives\ref\System.Net.Primitives.csproj" />
<ProjectReference Include="..\..\System.Net.Security\ref\System.Net.Security.csproj" />
<ProjectReference Include="..\..\System.Security.Cryptography.X509Certificates\ref\System.Security.Cryptography.X509Certificates.csproj" />
<ProjectReference Include="..\..\System.Text.Encoding\ref\System.Text.Encoding.csproj" />
</ItemGroup>
Expand Down
5 changes: 1 addition & 4 deletions src/System.Net.Http/src/ILLinkTrim.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,5 @@
<assembly fullname="System.Net.Http">
<!-- Anonymous types are used with DiagnosticSource logging and subscribers reflect over those, calling their public getters. -->
<type fullname="*f__AnonymousType*" />

<!-- TODO #23166: Remove once exposed in contract -->
<type fullname="System.Net.Http.ManagedHandler" />
</assembly>
</linker>
</linker>
84 changes: 42 additions & 42 deletions src/System.Net.Http/src/System.Net.Http.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -121,42 +121,42 @@
<Link>Common\System\Net\Logging\NetEventSource.Common.cs</Link>
</Compile>
</ItemGroup>
<!-- Managed HttpClientHandler implementation -->
<!-- SocketsHttpHandler implementation -->
<ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
<Compile Include="System\Net\Http\Managed\AuthenticateAndRedirectHandler.cs" />
<Compile Include="System\Net\Http\Managed\AuthenticationHelper.Basic.cs" />
<Compile Include="System\Net\Http\Managed\AuthenticationHelper.Digest.cs" />
<Compile Include="System\Net\Http\Managed\ChunkedEncodingReadStream.cs" />
<Compile Include="System\Net\Http\Managed\ChunkedEncodingWriteStream.cs" />
<Compile Include="System\Net\Http\Managed\ConnectHelper.cs" />
<Compile Include="System\Net\Http\Managed\ConnectionCloseReadStream.cs" />
<Compile Include="System\Net\Http\Managed\ContentLengthReadStream.cs" />
<Compile Include="System\Net\Http\Managed\ContentLengthWriteStream.cs" />
<Compile Include="System\Net\Http\Managed\CookieHandler.cs" />
<Compile Include="System\Net\Http\Managed\DecompressionHandler.cs" />
<Compile Include="System\Net\Http\Managed\EmptyReadStream.cs" />
<Compile Include="System\Net\Http\Managed\HttpConnection.cs" />
<Compile Include="System\Net\Http\Managed\HttpConnectionContent.cs" />
<Compile Include="System\Net\Http\Managed\HttpConnectionHandler.cs" />
<Compile Include="System\Net\Http\Managed\HttpConnectionKey.cs" />
<Compile Include="System\Net\Http\Managed\HttpConnectionPool.cs" />
<Compile Include="System\Net\Http\Managed\HttpConnectionPools.cs" />
<Compile Include="System\Net\Http\Managed\HttpConnectionSettings.cs" />
<Compile Include="System\Net\Http\Managed\HttpContentDuplexStream.cs" />
<Compile Include="System\Net\Http\Managed\HttpContentReadStream.cs" />
<Compile Include="System\Net\Http\Managed\HttpContentStream.cs" />
<Compile Include="System\Net\Http\Managed\HttpContentWriteStream.cs" />
<Compile Include="System\Net\Http\Managed\HttpProxyConnectionHandler.cs" />
<Compile Include="System\Net\Http\Managed\ManagedHandler.cs" />
<Compile Include="System\Net\Http\Managed\RawConnectionStream.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\AuthenticateAndRedirectHandler.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\AuthenticationHelper.Basic.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\AuthenticationHelper.Digest.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\ChunkedEncodingReadStream.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\ChunkedEncodingWriteStream.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\ConnectHelper.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\ConnectionCloseReadStream.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\ContentLengthReadStream.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\ContentLengthWriteStream.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\CookieHandler.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\DecompressionHandler.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\EmptyReadStream.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\HttpConnection.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\HttpConnectionContent.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\HttpConnectionHandler.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\HttpConnectionKey.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\HttpConnectionPool.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\HttpConnectionPools.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\HttpConnectionSettings.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\HttpContentDuplexStream.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\HttpContentReadStream.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\HttpContentStream.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\HttpContentWriteStream.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\HttpProxyConnectionHandler.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\RawConnectionStream.cs" />
</ItemGroup>
<!-- Managed HttpClientHandler platform parts -->
<!-- SocketsHttpHandler platform parts -->
<ItemGroup Condition=" '$(TargetsUnix)' == 'true' And '$(TargetGroup)' == 'netcoreapp'">
<Compile Include="System\Net\Http\Managed\HttpProxyConnectionHandler.Unix.cs" />
<Compile Include="System\Net\Http\Managed\HttpEnvironmentProxy.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\HttpProxyConnectionHandler.Unix.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.cs" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetsWindows)' == 'true' And '$(TargetGroup)' == 'netcoreapp'">
<Compile Include="System\Net\Http\Managed\HttpProxyConnectionHandler.Windows.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\HttpProxyConnectionHandler.Windows.cs" />
</ItemGroup>
<!-- Common -->
<ItemGroup>
Expand Down Expand Up @@ -187,7 +187,7 @@
<Link>Common\System\Net\Mail\WhitespaceReader.cs</Link>
</Compile>
</ItemGroup>
<!-- WinHTTP implementation -->
<!-- WinHttpHandler implementation -->
<ItemGroup Condition=" '$(TargetsWindows)' == 'true' And '$(TargetGroup)' != 'uap'">
<Compile Include="System\Net\Http\HttpClientHandler.Core.cs" />
<Compile Include="System\Net\Http\HttpClientHandler.Windows.cs" />
Expand All @@ -206,19 +206,19 @@
<ItemGroup Condition=" '$(TargetsWindows)' == 'true' And '$(TargetGroup)' != 'uap'">
<Compile Include="@(CompileItem)" />
</ItemGroup>
<!-- Unix -->
<!-- CurlHandler implementation -->
<PropertyGroup Condition=" '$(TargetsUnix)' == 'true' ">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetsUnix)' == 'true' ">
<Compile Include="System\Net\Http\HttpClientHandler.Core.cs" />
<Compile Include="System\Net\Http\HttpClientHandler.Unix.cs" />
<Compile Include="System\Net\Http\Unix\CurlHandler.cs" />
<Compile Include="System\Net\Http\Unix\CurlHandler.EasyRequest.cs" />
<Compile Include="System\Net\Http\Unix\CurlHandler.MultiAgent.cs" />
<Compile Include="System\Net\Http\Unix\CurlException.cs" />
<Compile Include="System\Net\Http\Unix\CurlHandler.CurlResponseMessage.cs" />
<Compile Include="System\Net\Http\Unix\CurlResponseHeaderReader.cs" />
<Compile Include="System\Net\Http\CurlHandler\CurlHandler.cs" />
<Compile Include="System\Net\Http\CurlHandler\CurlHandler.EasyRequest.cs" />
<Compile Include="System\Net\Http\CurlHandler\CurlHandler.MultiAgent.cs" />
<Compile Include="System\Net\Http\CurlHandler\CurlException.cs" />
<Compile Include="System\Net\Http\CurlHandler\CurlHandler.CurlResponseMessage.cs" />
<Compile Include="System\Net\Http\CurlHandler\CurlResponseHeaderReader.cs" />
<Compile Include="$(CommonPath)\System\StrongToWeakReference.cs">
<Link>Common\Interop\Unix\StrongToWeakReference.cs</Link>
</Compile>
Expand Down Expand Up @@ -377,11 +377,11 @@
<Compile Include="$(CommonPath)\System\Net\Security\CertificateValidation.Unix.cs">
<Link>Common\System\Net\Security\CertificateValidation.Unix.cs</Link>
</Compile>
<Compile Include="System\Net\Http\Unix\CurlHandler.ClientCertificateProvider.cs" />
<Compile Include="System\Net\Http\Unix\CurlHandler.SslProvider.cs" />
<Compile Include="System\Net\Http\CurlHandler\CurlHandler.ClientCertificateProvider.cs" />
<Compile Include="System\Net\Http\CurlHandler\CurlHandler.SslProvider.Linux.cs" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetsOSX)' == 'true' ">
<Compile Include="System\Net\Http\OSX\CurlHandler.SslProvider.cs" />
<Compile Include="System\Net\Http\CurlHandler\CurlHandler.SslProvider.OSX.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'uap'">
<Reference Include="Windows" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ private void ThrowForModifiedManagedSslOptionsIfStarted()
{
// Hack to trigger an InvalidOperationException if a property that's stored on
// SslOptions is changed, since SslOptions itself does not do any such checks.
_managedHandler.SslOptions = _managedHandler.SslOptions;
_socketsHttpHandler.SslOptions = _socketsHttpHandler.SslOptions;
}
}
}
Loading