Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.Net.Http.HttpConnectionPool Class Referencesealed

Classes

struct  RequestQueue
 

Public Member Functions

 HttpConnectionPool (HttpConnectionPoolManager poolManager, HttpConnectionKind kind, string host, int port, string sslHostName, Uri proxyUri)
 
async ValueTask< HttpResponseMessageSendWithVersionDetectionAndRetryAsync (HttpRequestMessage request, bool async, bool doRequestAuth, CancellationToken cancellationToken)
 
void OnNetworkChanged ()
 
Task< HttpResponseMessageSendWithNtConnectionAuthAsync (HttpConnection connection, HttpRequestMessage request, bool async, bool doRequestAuth, CancellationToken cancellationToken)
 
Task< HttpResponseMessageSendWithNtProxyAuthAsync (HttpConnection connection, HttpRequestMessage request, bool async, CancellationToken cancellationToken)
 
ValueTask< HttpResponseMessageSendWithProxyAuthAsync (HttpRequestMessage request, bool async, bool doRequestAuth, CancellationToken cancellationToken)
 
ValueTask< HttpResponseMessageSendAsync (HttpRequestMessage request, bool async, bool doRequestAuth, CancellationToken cancellationToken)
 
void InvalidateHttp11Connection (HttpConnection connection, bool disposing=true)
 
void InvalidateHttp2Connection (Http2Connection connection)
 
void ReturnHttp11Connection (HttpConnection connection, bool isNewConnection=false)
 
void ReturnHttp2Connection (Http2Connection connection, bool isNewConnection)
 
void InvalidateHttp3Connection (Http3Connection connection)
 
void Dispose ()
 
bool CleanCacheAndDisposeIfUnused ()
 
override string ToString ()
 

Package Functions

void HandleAltSvc (IEnumerable< string > altSvcHeaderValues, TimeSpan? responseAge)
 
void BlocklistAuthority (HttpAuthority badAuthority)
 
async ValueTask< HttpConnectionCreateHttp11ConnectionAsync (HttpRequestMessage request, bool async, CancellationToken cancellationToken)
 
void HeartBeat ()
 

Static Package Functions

static bool IsHttp3Supported ()
 

Package Attributes

readonly byte[] _http2EncodedAuthorityHostHeader
 
readonly byte[] _http3EncodedAuthorityHostHeader
 

Properties

HttpConnectionSettings Settings [get]
 
HttpConnectionKind Kind [get]
 
bool IsSecure [get]
 
Uri ProxyUri [get]
 
ICredentials ProxyCredentials [get]
 
byte[] HostHeaderValueBytes [get]
 
CredentialCache PreAuthCredentials [get]
 
byte[] Http2AltSvcOriginUri [get]
 
bool EnableMultipleHttp2Connections [get]
 
object SyncObj [get]
 
bool DoProxyAuth [get]
 

Private Member Functions

bool CheckExpirationOnGet (HttpConnectionBase connection)
 
async Task AddHttp11ConnectionAsync (HttpRequestMessage request)
 
void CheckForHttp11ConnectionInjection ()
 
async ValueTask< HttpConnectionGetHttp11ConnectionAsync (HttpRequestMessage request, bool async, CancellationToken cancellationToken)
 
async Task HandleHttp11Downgrade (HttpRequestMessage request, Socket socket, Stream stream, TransportContext transportContext, CancellationToken cancellationToken)
 
async Task AddHttp2ConnectionAsync (HttpRequestMessage request)
 
void CheckForHttp2ConnectionInjection ()
 
async ValueTask< Http2ConnectionGetHttp2ConnectionAsync (HttpRequestMessage request, bool async, CancellationToken cancellationToken)
 
async ValueTask< Http3ConnectionGetHttp3ConnectionAsync (HttpRequestMessage request, HttpAuthority authority, CancellationToken cancellationToken)
 
async ValueTask< HttpResponseMessageTrySendUsingHttp3Async (HttpRequestMessage request, bool async, CancellationToken cancellationToken)
 
void ProcessAltSvc (HttpResponseMessage response)
 
void ExpireAltSvcAuthority ()
 
bool IsAltSvcBlocked (HttpAuthority authority)
 
CancellationTokenSource GetConnectTimeoutCancellationTokenSource ()
 
async ValueTask<(Socket, Stream, TransportContext)> ConnectAsync (HttpRequestMessage request, bool async, CancellationToken cancellationToken)
 
async ValueTask<(Socket, Stream)> ConnectToTcpHostAsync (string host, int port, HttpRequestMessage initialRequest, bool async, CancellationToken cancellationToken)
 
SslClientAuthenticationOptions GetSslOptionsForRequest (HttpRequestMessage request)
 
async ValueTask< StreamApplyPlaintextFilterAsync (bool async, Stream stream, Version httpVersion, HttpRequestMessage request, CancellationToken cancellationToken)
 
async ValueTask< HttpConnectionConstructHttp11ConnectionAsync (bool async, Socket socket, Stream stream, TransportContext transportContext, HttpRequestMessage request, CancellationToken cancellationToken)
 
async ValueTask< Http2ConnectionConstructHttp2ConnectionAsync (Stream stream, HttpRequestMessage request, CancellationToken cancellationToken)
 
async ValueTask< StreamEstablishProxyTunnelAsync (bool async, HttpRequestHeaders headers, CancellationToken cancellationToken)
 
async ValueTask<(Socket socket, Stream stream)> EstablishSocksTunnel (HttpRequestMessage request, bool async, CancellationToken cancellationToken)
 
void HandleHttp11ConnectionFailure (Exception e)
 
void HandleHttp2ConnectionFailure (Exception e)
 
bool CheckExpirationOnReturn (HttpConnectionBase connection)
 
void DisableHttp2Connection (Http2Connection connection)
 
void Trace (string message, [CallerMemberName] string memberName=null)
 

Static Private Member Functions

static SslClientAuthenticationOptions ConstructSslOptions (HttpConnectionPoolManager poolManager, string sslHostName)
 
static void ThrowGetVersionException (HttpRequestMessage request, int desiredVersion)
 
static Exception CreateConnectTimeoutException (OperationCanceledException oce)
 
static bool GetIsWindows7Or2008R2 ()
 

Private Attributes

readonly HttpConnectionPoolManager _poolManager
 
readonly HttpConnectionKind _kind
 
readonly Uri _proxyUri
 
readonly HttpAuthority _originAuthority
 
volatile HttpAuthority _http3Authority
 
Timer _authorityExpireTimer
 
bool _persistAuthority
 
volatile HashSet< HttpAuthority_altSvcBlocklist
 
CancellationTokenSource _altSvcBlocklistTimerCancellation
 
volatile bool _altSvcEnabled = true
 
readonly List< HttpConnection_availableHttp11Connections = new List<HttpConnection>()
 
readonly int _maxHttp11Connections
 
int _associatedHttp11ConnectionCount
 
int _pendingHttp11ConnectionCount
 
RequestQueue< HttpConnection_http11RequestQueue
 
List< Http2Connection_availableHttp2Connections
 
int _associatedHttp2ConnectionCount
 
bool _pendingHttp2Connection
 
RequestQueue< Http2Connection_http2RequestQueue
 
bool _http2Enabled
 
byte[] _http2AltSvcOriginUri
 
readonly bool _http3Enabled
 
Http3Connection _http3Connection
 
SemaphoreSlim _http3ConnectionCreateLock
 
readonly byte[] _hostHeaderValueBytes
 
readonly SslClientAuthenticationOptions _sslOptionsHttp11
 
readonly SslClientAuthenticationOptions _sslOptionsHttp2
 
readonly SslClientAuthenticationOptions _sslOptionsHttp2Only
 
readonly SslClientAuthenticationOptions _sslOptionsHttp3
 
bool _usedSinceLastCleanup = true
 
bool _disposed
 

Static Private Attributes

static readonly bool s_isWindows7Or2008R2 = GetIsWindows7Or2008R2()
 
static readonly List< SslApplicationProtocols_http3ApplicationProtocols = new List<SslApplicationProtocol> { SslApplicationProtocol.Http3 }
 
static readonly List< SslApplicationProtocols_http2ApplicationProtocols
 
static readonly List< SslApplicationProtocols_http2OnlyApplicationProtocols = new List<SslApplicationProtocol> { SslApplicationProtocol.Http2 }
 

Detailed Description

Definition at line 22 of file HttpConnectionPool.cs.


The documentation for this class was generated from the following file: