144 references to HttpTransportType
Microsoft.AspNetCore.Http.Connections (84)
_generated\0\LoggerMessage.g.cs (27)
59private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Http.Connections.HttpTransportType, global::System.Exception?> __WaitingForTransportCallback = 60global::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 }); 67public static partial void WaitingForTransport(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Http.Connections.HttpTransportType transportType) 75private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Http.Connections.HttpTransportType, global::System.Exception?> __TransportCompleteCallback = 76global::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 }); 83public static partial void TransportComplete(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Http.Connections.HttpTransportType transportType) 91private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Http.Connections.HttpTransportType, global::System.Exception?> __ShuttingDownTransportAndApplicationCallback = 92global::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 }); 99public static partial void ShuttingDownTransportAndApplication(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Http.Connections.HttpTransportType transportType) 107private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Http.Connections.HttpTransportType, global::System.Exception?> __WaitingForTransportAndApplicationCallback = 108global::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 }); 115public static partial void WaitingForTransportAndApplication(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Http.Connections.HttpTransportType transportType) 123private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Http.Connections.HttpTransportType, global::System.Exception?> __TransportAndApplicationCompleteCallback = 124global::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 }); 131public static partial void TransportAndApplicationComplete(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Http.Connections.HttpTransportType transportType) 292private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Http.Connections.HttpTransportType, global::System.Exception?> __TransportNotSupportedCallback = 293global::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 }); 300public static partial void TransportNotSupported(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Http.Connections.HttpTransportType transportType) 308private 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 = 309global::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 }); 316public static partial void CannotChangeTransport(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Http.Connections.HttpTransportType transportType, global::Microsoft.AspNetCore.Http.Connections.HttpTransportType requestedTransport) 356private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Http.Connections.HttpTransportType, global::System.Exception?> __ReceivedDeleteRequestForUnsupportedTransportCallback = 357global::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 }); 364public static partial void ReceivedDeleteRequestForUnsupportedTransport(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Http.Connections.HttpTransportType transportType)
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. 17HttpTransportType TransportType { get; }
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. 46public HttpTransportType Transports { get; set; }
Internal\HttpConnectionContext.cs (12)
135public HttpTransportType TransportType { get; set; } 675if (TransportType == HttpTransportType.WebSockets) 925if (UseStatefulReconnect && TransportType == HttpTransportType.WebSockets) 954internal SetTransportState TrySetTransport(HttpTransportType transportType, HttpConnectionsMetrics metrics) 958if (TransportType == HttpTransportType.None) 999Debug.Assert(TransportType != HttpTransportType.None, "Transport has not been initialized yet"); 1124return UseStatefulReconnect == true || TransportType == HttpTransportType.LongPolling; 1176public static partial void WaitingForTransport(ILogger logger, HttpTransportType transportType); 1179public static partial void TransportComplete(ILogger logger, HttpTransportType transportType); 1182public static partial void ShuttingDownTransportAndApplication(ILogger logger, HttpTransportType transportType); 1185public static partial void WaitingForTransportAndApplication(ILogger logger, HttpTransportType transportType); 1188public static partial void TransportAndApplicationComplete(ILogger logger, HttpTransportType transportType);
Internal\HttpConnectionDispatcher.cs (25)
27Transport = nameof(HttpTransportType.WebSockets), 34Transport = nameof(HttpTransportType.ServerSentEvents), 41Transport = nameof(HttpTransportType.LongPolling), 276var supportedTransports = options.Transports; 292if (!await EnsureConnectionStateAsync(connection, context, HttpTransportType.ServerSentEvents, supportedTransports, logScope, options)) 316var transport = HttpTransportType.LongPolling; 319transport = HttpTransportType.WebSockets; 349if (connection.TransportType != HttpTransportType.WebSockets || connection.UseStatefulReconnect) 365case HttpTransportType.None: 367case HttpTransportType.WebSockets: 381case HttpTransportType.LongPolling: 433if (transport != HttpTransportType.LongPolling) 591if ((options.Transports & HttpTransportType.WebSockets) != 0 && ServerHasWebSockets(context.Features)) 596if ((options.Transports & HttpTransportType.ServerSentEvents) != 0) 601if ((options.Transports & HttpTransportType.LongPolling) != 0) 627if (connection.TransportType == HttpTransportType.WebSockets) 724if (connection.TransportType != HttpTransportType.LongPolling) 747private async Task<bool> EnsureConnectionStateAsync(HttpConnectionContext connection, HttpContext context, HttpTransportType transportType, HttpTransportType supportedTransports, ConnectionLogScope logScope, HttpConnectionDispatcherOptions options) 779var isStatefulReconnect = transportType == HttpTransportType.WebSockets 789&& (transportType == HttpTransportType.LongPolling || isStatefulReconnect) 845if (transportType == HttpTransportType.LongPolling) 881if (transportType == HttpTransportType.LongPolling 891if (transportType == HttpTransportType.LongPolling && connection.User?.Identity is WindowsIdentity)
Internal\HttpConnectionDispatcher.Log.cs (4)
31public static partial void TransportNotSupported(ILogger logger, HttpTransportType transportType); 34public static partial void CannotChangeTransport(ILogger logger, HttpTransportType transportType, HttpTransportType requestedTransport); 43public static partial void ReceivedDeleteRequestForUnsupportedTransport(ILogger logger, HttpTransportType transportType);
Internal\HttpConnectionManager.cs (2)
88public void RemoveConnection(string id, HttpTransportType transportType, HttpConnectionStopStatus status) 95if (connection.TransportType != HttpTransportType.None)
Internal\HttpConnectionsMetrics.cs (9)
45public void ConnectionStop(in MetricsContext metricsContext, HttpTransportType transportType, HttpConnectionStopStatus status, long startTimestamp, long currentTimestamp) 56public void ConnectionTransportStart(in MetricsContext metricsContext, HttpTransportType transportType) 58Debug.Assert(transportType != HttpTransportType.None); 67public void TransportStop(in MetricsContext metricsContext, HttpTransportType transportType) 73if (transportType != HttpTransportType.None) 80private static string ResolveTransportType(HttpTransportType transportType) 84HttpTransportType.ServerSentEvents => "server_sent_events", 85HttpTransportType.LongPolling => "long_polling", 86HttpTransportType.WebSockets => "web_sockets",
Microsoft.AspNetCore.Http.Connections.Client (46)
_generated\0\LoggerMessage.g.cs (9)
168private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Http.Connections.HttpTransportType, global::System.Exception?> __ErrorStartingTransportCallback = 169global::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 }); 176public static partial void ErrorStartingTransport(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Http.Connections.HttpTransportType transport, global::System.Exception exception) 271private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Http.Connections.HttpTransportType, global::System.Exception?> __TransportStartedCallback = 272global::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 }); 279public static partial void TransportStarted(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Http.Connections.HttpTransportType transport) 344private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Http.Connections.HttpTransportType, global::System.Exception?> __TransportNotSupportedCallback = 345global::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 }); 352public 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> 116public 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> 127public HttpConnection(Uri url, HttpTransportType transports, ILoggerFactory? loggerFactory) 132private static HttpConnectionOptions CreateHttpOptions(Uri url, HttpTransportType transports) 163if (httpConnectionOptions.Transports == HttpTransportType.ServerSentEvents && OperatingSystem.IsBrowser()) 322if (_httpConnectionOptions.Transports == HttpTransportType.WebSockets) 375if (!Enum.TryParse<HttpTransportType>(transport.Transport, out var transportType)) 382if (transportType == HttpTransportType.WebSockets && !IsWebSocketsSupported()) 389if (transportType == HttpTransportType.ServerSentEvents && OperatingSystem.IsBrowser()) 414_httpConnectionOptions.UseStatefulReconnect = transportType == HttpTransportType.WebSockets ? _httpConnectionOptions.UseStatefulReconnect : false; 538private async Task StartTransport(Uri connectUrl, HttpTransportType transportType, TransferFormat transferFormat, 558_hasInherentKeepAlive = transportType == HttpTransportType.LongPolling;
HttpConnection.Log.cs (6)
33public static void StartingTransport(ILogger logger, HttpTransportType transportType, Uri url) 54public static partial void ErrorStartingTransport(ILogger logger, HttpTransportType transport, Exception exception); 59public static void TransportDoesNotSupportTransferFormat(ILogger logger, HttpTransportType transport, TransferFormat transferFormat) 72public static void TransportDisabledByClient(ILogger logger, HttpTransportType transport) 83public static void TransportFailed(ILogger logger, HttpTransportType transport, Exception ex) 101public 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. 173public HttpTransportType Transports { get; set; } 179/// Negotiation can only be skipped when using the <see cref="HttpTransportType.WebSockets"/> transport.
Internal\DefaultTransportFactory.cs (13)
16private readonly HttpTransportType _requestedTransportType; 20public DefaultTransportFactory(HttpTransportType requestedTransportType, ILoggerFactory loggerFactory, HttpClient? httpClient, HttpConnectionOptions httpConnectionOptions, Func<Task<string?>> accessTokenProvider) 22if (httpClient == null && requestedTransportType != HttpTransportType.WebSockets) 24throw new ArgumentException($"{nameof(httpClient)} cannot be null when {nameof(requestedTransportType)} is not {nameof(HttpTransportType.WebSockets)}.", nameof(httpClient)); 34public ITransport CreateTransport(HttpTransportType availableServerTransports, bool useStatefulReconnect) 36if (_websocketsSupported && (availableServerTransports & HttpTransportType.WebSockets & _requestedTransportType) == HttpTransportType.WebSockets) 44Log.TransportNotSupported(_loggerFactory.CreateLogger<DefaultTransportFactory>(), HttpTransportType.WebSockets, ex); 49if ((availableServerTransports & HttpTransportType.ServerSentEvents & _requestedTransportType) == HttpTransportType.ServerSentEvents) 55if ((availableServerTransports & HttpTransportType.LongPolling & _requestedTransportType) == HttpTransportType.LongPolling) 67public static partial void TransportNotSupported(ILogger logger, HttpTransportType transportType, Exception ex);
Internal\ITransportFactory.cs (1)
8ITransport CreateTransport(HttpTransportType availableServerTransports, bool useStatefulReconnect);
Microsoft.AspNetCore.Http.Connections.Common (5)
HttpTransports.cs (5)
12/// A bitmask combining all available <see cref="HttpTransportType"/> values. 14public 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> 66public 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> 80public 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> 118public 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> 132public static IHubConnectionBuilder WithUrl(this IHubConnectionBuilder hubConnectionBuilder, Uri url, HttpTransportType transports, Action<HttpConnectionOptions> configureHttpConnection) 138private static IHubConnectionBuilder WithUrlCore(this IHubConnectionBuilder hubConnectionBuilder, Uri url, HttpTransportType? transports, Action<HttpConnectionOptions>? configureHttpConnection)