144 references to HttpTransportType
Microsoft.AspNetCore.Http.Connections (84)
Features\IHttpTransportFeature.cs (3)
9
/// Feature set on the <see cref="ConnectionContext"/> that exposes the <see cref="
HttpTransportType
"/>
15
/// The <see cref="
HttpTransportType
"/> the connection is using.
17
HttpTransportType
TransportType { get; }
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\LoggerMessage.g.cs (27)
59
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
, global::System.Exception?> __WaitingForTransportCallback =
60
global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
>(global::Microsoft.Extensions.Logging.LogLevel.Trace, new global::Microsoft.Extensions.Logging.EventId(4, "WaitingForTransport"), "Waiting for {TransportType} transport to complete.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
67
public static partial void WaitingForTransport(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
transportType)
75
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
, global::System.Exception?> __TransportCompleteCallback =
76
global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
>(global::Microsoft.Extensions.Logging.LogLevel.Trace, new global::Microsoft.Extensions.Logging.EventId(5, "TransportComplete"), "{TransportType} transport complete.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
83
public static partial void TransportComplete(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
transportType)
91
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
, global::System.Exception?> __ShuttingDownTransportAndApplicationCallback =
92
global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
>(global::Microsoft.Extensions.Logging.LogLevel.Trace, new global::Microsoft.Extensions.Logging.EventId(6, "ShuttingDownTransportAndApplication"), "Shutting down both the application and the {TransportType} transport.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
99
public static partial void ShuttingDownTransportAndApplication(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
transportType)
107
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
, global::System.Exception?> __WaitingForTransportAndApplicationCallback =
108
global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
>(global::Microsoft.Extensions.Logging.LogLevel.Trace, new global::Microsoft.Extensions.Logging.EventId(7, "WaitingForTransportAndApplication"), "Waiting for both the application and {TransportType} transport to complete.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
115
public static partial void WaitingForTransportAndApplication(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
transportType)
123
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
, global::System.Exception?> __TransportAndApplicationCompleteCallback =
124
global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
>(global::Microsoft.Extensions.Logging.LogLevel.Trace, new global::Microsoft.Extensions.Logging.EventId(8, "TransportAndApplicationComplete"), "The application and {TransportType} transport are both complete.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
131
public static partial void TransportAndApplicationComplete(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
transportType)
292
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
, global::System.Exception?> __TransportNotSupportedCallback =
293
global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(7, "TransportNotSupported"), "{TransportType} transport not supported by this connection handler.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
300
public static partial void TransportNotSupported(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
transportType)
308
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
, global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
, global::System.Exception?> __CannotChangeTransportCallback =
309
global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
, global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(8, "CannotChangeTransport"), "Cannot change transports mid-connection; currently using {TransportType}, requesting {RequestedTransport}.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
316
public static partial void CannotChangeTransport(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
transportType, global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
requestedTransport)
356
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
, global::System.Exception?> __ReceivedDeleteRequestForUnsupportedTransportCallback =
357
global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
>(global::Microsoft.Extensions.Logging.LogLevel.Trace, new global::Microsoft.Extensions.Logging.EventId(11, "ReceivedDeleteRequestForUnsupportedTransport"), "Received DELETE request for unsupported transport: {TransportType}.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
364
public static partial void ReceivedDeleteRequestForUnsupportedTransport(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
transportType)
HttpConnectionDispatcherOptions.cs (2)
44
/// Gets or sets a bitmask combining one or more <see cref="
HttpTransportType
"/> values that specify what transports the server should use to receive HTTP requests.
46
public
HttpTransportType
Transports { get; set; }
Internal\HttpConnectionContext.cs (12)
135
public
HttpTransportType
TransportType { get; set; }
677
if (TransportType ==
HttpTransportType
.WebSockets)
927
if (UseStatefulReconnect && TransportType ==
HttpTransportType
.WebSockets)
956
internal SetTransportState TrySetTransport(
HttpTransportType
transportType, HttpConnectionsMetrics metrics)
960
if (TransportType ==
HttpTransportType
.None)
1001
Debug.Assert(TransportType !=
HttpTransportType
.None, "Transport has not been initialized yet");
1126
return UseStatefulReconnect == true || TransportType ==
HttpTransportType
.LongPolling;
1178
public static partial void WaitingForTransport(ILogger logger,
HttpTransportType
transportType);
1181
public static partial void TransportComplete(ILogger logger,
HttpTransportType
transportType);
1184
public static partial void ShuttingDownTransportAndApplication(ILogger logger,
HttpTransportType
transportType);
1187
public static partial void WaitingForTransportAndApplication(ILogger logger,
HttpTransportType
transportType);
1190
public static partial void TransportAndApplicationComplete(ILogger logger,
HttpTransportType
transportType);
Internal\HttpConnectionDispatcher.cs (25)
27
Transport = nameof(
HttpTransportType
.WebSockets),
34
Transport = nameof(
HttpTransportType
.ServerSentEvents),
41
Transport = nameof(
HttpTransportType
.LongPolling),
290
var
supportedTransports = options.Transports;
306
if (!await EnsureConnectionStateAsync(connection, context,
HttpTransportType
.ServerSentEvents, supportedTransports, logScope, options))
330
var
transport =
HttpTransportType
.LongPolling;
333
transport =
HttpTransportType
.WebSockets;
363
if (connection.TransportType !=
HttpTransportType
.WebSockets || connection.UseStatefulReconnect)
379
case
HttpTransportType
.None:
381
case
HttpTransportType
.WebSockets:
395
case
HttpTransportType
.LongPolling:
447
if (transport !=
HttpTransportType
.LongPolling)
609
if ((options.Transports &
HttpTransportType
.WebSockets) != 0 && ServerHasWebSockets(context.Features))
614
if ((options.Transports &
HttpTransportType
.ServerSentEvents) != 0)
619
if ((options.Transports &
HttpTransportType
.LongPolling) != 0)
648
if (connection.TransportType ==
HttpTransportType
.WebSockets)
745
if (connection.TransportType !=
HttpTransportType
.LongPolling)
768
private async Task<bool> EnsureConnectionStateAsync(HttpConnectionContext connection, HttpContext context,
HttpTransportType
transportType,
HttpTransportType
supportedTransports, ConnectionLogScope logScope, HttpConnectionDispatcherOptions options)
800
var isStatefulReconnect = transportType ==
HttpTransportType
.WebSockets
810
&& (transportType ==
HttpTransportType
.LongPolling || isStatefulReconnect)
866
if (transportType ==
HttpTransportType
.LongPolling)
902
if (transportType ==
HttpTransportType
.LongPolling
912
if (transportType ==
HttpTransportType
.LongPolling && connection.User?.Identity is WindowsIdentity)
Internal\HttpConnectionDispatcher.Log.cs (4)
31
public static partial void TransportNotSupported(ILogger logger,
HttpTransportType
transportType);
34
public static partial void CannotChangeTransport(ILogger logger,
HttpTransportType
transportType,
HttpTransportType
requestedTransport);
43
public static partial void ReceivedDeleteRequestForUnsupportedTransport(ILogger logger,
HttpTransportType
transportType);
Internal\HttpConnectionManager.cs (2)
108
public void RemoveConnection(string id,
HttpTransportType
transportType, HttpConnectionStopStatus status)
115
if (connection.TransportType !=
HttpTransportType
.None)
Internal\HttpConnectionsMetrics.cs (9)
45
public void ConnectionStop(in MetricsContext metricsContext,
HttpTransportType
transportType, HttpConnectionStopStatus status, long startTimestamp, long currentTimestamp)
56
public void ConnectionTransportStart(in MetricsContext metricsContext,
HttpTransportType
transportType)
58
Debug.Assert(transportType !=
HttpTransportType
.None);
67
public void TransportStop(in MetricsContext metricsContext,
HttpTransportType
transportType)
73
if (transportType !=
HttpTransportType
.None)
80
private static string ResolveTransportType(
HttpTransportType
transportType)
84
HttpTransportType
.ServerSentEvents => "server_sent_events",
85
HttpTransportType
.LongPolling => "long_polling",
86
HttpTransportType
.WebSockets => "web_sockets",
Microsoft.AspNetCore.Http.Connections.Client (46)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\LoggerMessage.g.cs (9)
168
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
, global::System.Exception?> __ErrorStartingTransportCallback =
169
global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
>(global::Microsoft.Extensions.Logging.LogLevel.Error, new global::Microsoft.Extensions.Logging.EventId(11, "ErrorStartingTransport"), "Failed to start connection. Error starting transport '{Transport}'.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
176
public static partial void ErrorStartingTransport(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
transport, global::System.Exception exception)
271
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
, global::System.Exception?> __TransportStartedCallback =
272
global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(18, "TransportStarted"), "Transport '{Transport}' started.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
279
public static partial void TransportStarted(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
transport)
344
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
, global::System.Exception?> __TransportNotSupportedCallback =
345
global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(1, "TransportNotSupported"), "Transport '{TransportType}' is not supported.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
352
public static partial void TransportNotSupported(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Http.Connections.
HttpTransportType
transportType, global::System.Exception ex)
HttpConnection.cs (14)
115
/// <param name="transports">A bitmask combining one or more <see cref="
HttpTransportType
"/> values that specify what transports the client should use.</param>
116
public HttpConnection(Uri url,
HttpTransportType
transports)
125
/// <param name="transports">A bitmask combining one or more <see cref="
HttpTransportType
"/> values that specify what transports the client should use.</param>
127
public HttpConnection(Uri url,
HttpTransportType
transports, ILoggerFactory? loggerFactory)
132
private static HttpConnectionOptions CreateHttpOptions(Uri url,
HttpTransportType
transports)
163
if (httpConnectionOptions.Transports ==
HttpTransportType
.ServerSentEvents && OperatingSystem.IsBrowser())
322
if (_httpConnectionOptions.Transports ==
HttpTransportType
.WebSockets)
375
if (!Enum.TryParse<
HttpTransportType
>(transport.Transport, out
var
transportType))
382
if (transportType ==
HttpTransportType
.WebSockets && !IsWebSocketsSupported())
389
if (transportType ==
HttpTransportType
.ServerSentEvents && OperatingSystem.IsBrowser())
414
_httpConnectionOptions.UseStatefulReconnect = transportType ==
HttpTransportType
.WebSockets ? _httpConnectionOptions.UseStatefulReconnect : false;
538
private async Task StartTransport(Uri connectUrl,
HttpTransportType
transportType, TransferFormat transferFormat,
558
_hasInherentKeepAlive = transportType ==
HttpTransportType
.LongPolling;
HttpConnection.Log.cs (6)
33
public static void StartingTransport(ILogger logger,
HttpTransportType
transportType, Uri url)
54
public static partial void ErrorStartingTransport(ILogger logger,
HttpTransportType
transport, Exception exception);
59
public static void TransportDoesNotSupportTransferFormat(ILogger logger,
HttpTransportType
transport, TransferFormat transferFormat)
72
public static void TransportDisabledByClient(ILogger logger,
HttpTransportType
transport)
83
public static void TransportFailed(ILogger logger,
HttpTransportType
transport, Exception ex)
101
public static partial void TransportStarted(ILogger logger,
HttpTransportType
transport);
HttpConnectionOptions.cs (3)
171
/// Gets or sets a bitmask combining one or more <see cref="
HttpTransportType
"/> values that specify what transports the client should use to send HTTP requests.
173
public
HttpTransportType
Transports { get; set; }
179
/// Negotiation can only be skipped when using the <see cref="
HttpTransportType
.WebSockets"/> transport.
Internal\DefaultTransportFactory.cs (13)
16
private readonly
HttpTransportType
_requestedTransportType;
20
public DefaultTransportFactory(
HttpTransportType
requestedTransportType, ILoggerFactory loggerFactory, HttpClient? httpClient, HttpConnectionOptions httpConnectionOptions, Func<Task<string?>> accessTokenProvider)
22
if (httpClient == null && requestedTransportType !=
HttpTransportType
.WebSockets)
24
throw new ArgumentException($"{nameof(httpClient)} cannot be null when {nameof(requestedTransportType)} is not {nameof(
HttpTransportType
.WebSockets)}.", nameof(httpClient));
34
public ITransport CreateTransport(
HttpTransportType
availableServerTransports, bool useStatefulReconnect)
36
if (_websocketsSupported && (availableServerTransports &
HttpTransportType
.WebSockets & _requestedTransportType) ==
HttpTransportType
.WebSockets)
44
Log.TransportNotSupported(_loggerFactory.CreateLogger<DefaultTransportFactory>(),
HttpTransportType
.WebSockets, ex);
49
if ((availableServerTransports &
HttpTransportType
.ServerSentEvents & _requestedTransportType) ==
HttpTransportType
.ServerSentEvents)
55
if ((availableServerTransports &
HttpTransportType
.LongPolling & _requestedTransportType) ==
HttpTransportType
.LongPolling)
67
public static partial void TransportNotSupported(ILogger logger,
HttpTransportType
transportType, Exception ex);
Internal\ITransportFactory.cs (1)
8
ITransport CreateTransport(
HttpTransportType
availableServerTransports, bool useStatefulReconnect);
Microsoft.AspNetCore.Http.Connections.Common (5)
HttpTransports.cs (5)
12
/// A bitmask combining all available <see cref="
HttpTransportType
"/> values.
14
public static readonly
HttpTransportType
All =
HttpTransportType
.WebSockets |
HttpTransportType
.ServerSentEvents |
HttpTransportType
.LongPolling;
Microsoft.AspNetCore.SignalR.Client (9)
HubConnectionBuilderHttpExtensions.cs (9)
64
/// <param name="transports">A bitmask combining one or more <see cref="
HttpTransportType
"/> values that specify what transports the client should use.</param>
66
public static IHubConnectionBuilder WithUrl(this IHubConnectionBuilder hubConnectionBuilder, [StringSyntax(StringSyntaxAttribute.Uri)] string url,
HttpTransportType
transports)
77
/// <param name="transports">A bitmask combining one or more <see cref="
HttpTransportType
"/> values that specify what transports the client should use.</param>
80
public static IHubConnectionBuilder WithUrl(this IHubConnectionBuilder hubConnectionBuilder, [StringSyntax(StringSyntaxAttribute.Uri)] string url,
HttpTransportType
transports, Action<HttpConnectionOptions> configureHttpConnection)
116
/// <param name="transports">A bitmask combining one or more <see cref="
HttpTransportType
"/> values that specify what transports the client should use.</param>
118
public static IHubConnectionBuilder WithUrl(this IHubConnectionBuilder hubConnectionBuilder, Uri url,
HttpTransportType
transports)
129
/// <param name="transports">A bitmask combining one or more <see cref="
HttpTransportType
"/> values that specify what transports the client should use.</param>
132
public static IHubConnectionBuilder WithUrl(this IHubConnectionBuilder hubConnectionBuilder, Uri url,
HttpTransportType
transports, Action<HttpConnectionOptions> configureHttpConnection)
138
private static IHubConnectionBuilder WithUrlCore(this IHubConnectionBuilder hubConnectionBuilder, Uri url,
HttpTransportType
? transports, Action<HttpConnectionOptions>? configureHttpConnection)