1 instantiation of HttpConnectionContext
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionManager.cs (1)
81
var connection = new
HttpConnectionContext
(id, connectionToken, _connectionLogger, metricsContext, pair.Application, pair.Transport, options, useStatefulReconnect);
48 references to HttpConnectionContext
Microsoft.AspNetCore.Http.Connections (48)
Internal\HttpConnectionContext.cs (3)
1128
HttpConnectionContext
connection,
1132
private
HttpConnectionContext
? _connection = connection;
1144
var
connection = Interlocked.Exchange(ref _connection, null);
Internal\HttpConnectionDispatcher.cs (28)
70
HttpConnectionContext
? connectionContext = null;
160
if (!_manager.TryGetConnection(connectionToken.ToString(), out
var
connection))
199
if (updateResult ==
HttpConnectionContext
.UserUpdateResult.Rejected)
206
else if (updateResult ==
HttpConnectionContext
.UserUpdateResult.AdditionalPolicyRejected)
285
var
connection = await GetConnectionAsync(context);
315
HttpConnectionContext
? connection;
478
private async Task DoPersistentConnection(
HttpConnectionContext
connection)
525
HttpConnectionContext
? connection = null;
618
var
connection = await GetConnectionAsync(context);
716
var
connection = await GetConnectionAsync(context);
747
private async Task<bool> EnsureConnectionStateAsync(
HttpConnectionContext
connection, HttpContext context, HttpTransportType transportType, HttpTransportType supportedTransports, ConnectionLogScope logScope, HttpConnectionDispatcherOptions options)
760
case
HttpConnectionContext
.SetTransportState.Success:
763
case
HttpConnectionContext
.SetTransportState.AlreadyActive:
771
case
HttpConnectionContext
.SetTransportState.CannotChange:
803
var principalChanged = !
HttpConnectionContext
.ClaimsPrincipalContentEquals(currentUser, newPrincipal)
821
if (updateResult ==
HttpConnectionContext
.UserUpdateResult.Rejected)
826
else if (updateResult ==
HttpConnectionContext
.UserUpdateResult.AdditionalPolicyRejected)
906
private static void UpdateExpiration(
HttpConnectionContext
connection, HttpContext context, HttpConnectionDispatcherOptions options)
919
private static DateTimeOffset GetAuthenticationExpiration(
HttpConnectionContext
connection, HttpContext context, HttpConnectionDispatcherOptions options)
1003
private static void CloneHttpContext(HttpContext context,
HttpConnectionContext
connection)
1069
private async Task<bool> RejectIfConnectionUserChangedAsync(
HttpConnectionContext
connection, HttpContext context)
1090
var originalIdentity = originalUser is null ? null :
HttpConnectionContext
.GetUserIdentityKey(originalUser);
1091
var newIdentity =
HttpConnectionContext
.GetUserIdentityKey(newUser);
1095
private async Task<
HttpConnectionContext
?> GetConnectionAsync(HttpContext context)
1109
if (!_manager.TryGetConnection(connectionToken.ToString(), out
var
connection))
1122
private async Task<
HttpConnectionContext
?> GetOrCreateConnectionAsync(HttpContext context, HttpConnectionDispatcherOptions options)
1125
HttpConnectionContext
? connection;
1144
private
HttpConnectionContext
CreateConnection(HttpConnectionDispatcherOptions options, int clientProtocolVersion = 0, bool useStatefulReconnect = false)
Internal\HttpConnectionManager.cs (11)
22
private readonly ConcurrentDictionary<string,
HttpConnectionContext
> _connections =
23
new ConcurrentDictionary<string,
HttpConnectionContext
>(StringComparer.Ordinal);
26
private readonly ILogger<
HttpConnectionContext
> _connectionLogger;
33
_connectionLogger = loggerFactory.CreateLogger<
HttpConnectionContext
>();
49
internal bool TryGetConnection(string id, [NotNullWhen(true)] out
HttpConnectionContext
? connection)
54
internal
HttpConnectionContext
CreateConnection()
63
internal
HttpConnectionContext
CreateConnection(HttpConnectionDispatcherOptions options, int negotiateVersion = 0, bool useStatefulReconnect = false)
81
var
connection = new HttpConnectionContext(id, connectionToken, _connectionLogger, metricsContext, pair.Application, pair.Transport, options, useStatefulReconnect);
91
if (_connections.TryRemove(id, out
var
connection))
149
var
connection = c.Value;
203
internal async Task DisposeAndRemoveAsync(
HttpConnectionContext
connection, bool closeGracefully, HttpConnectionStopStatus status)
Internal\Transports\LongPollingServerTransport.cs (2)
15
private readonly
HttpConnectionContext
? _connection;
21
public LongPollingServerTransport(CancellationToken timeoutToken, PipeReader application, ILoggerFactory loggerFactory,
HttpConnectionContext
? connection)
Internal\Transports\ServerSentEventsServerTransport.cs (2)
15
private readonly
HttpConnectionContext
? _connection;
21
public ServerSentEventsServerTransport(PipeReader application, string connectionId,
HttpConnectionContext
? connection, ILoggerFactory loggerFactory)
Internal\Transports\WebSocketsServerTransport.cs (2)
17
private readonly
HttpConnectionContext
_connection;
23
public WebSocketsServerTransport(WebSocketOptions options, IDuplexPipe application,
HttpConnectionContext
connection, ILoggerFactory loggerFactory)