5 implementations of IHttpWebSocketFeature
Microsoft.AspNetCore.Http.Connections.Tests (1)
TestWebSocketConnectionFeature.cs (1)
16internal class TestWebSocketConnectionFeature : IHttpWebSocketFeature, IDisposable
Microsoft.AspNetCore.Http.Tests (1)
DefaultHttpContextTests.cs (1)
494private class TestHttpWebSocketFeature : IHttpWebSocketFeature
Microsoft.AspNetCore.Owin (1)
OwinFeatureCollection.cs (1)
33IHttpWebSocketFeature,
Microsoft.AspNetCore.TestHost (1)
WebSocketClient.cs (1)
120private sealed class WebSocketFeature : IHttpWebSocketFeature
Microsoft.AspNetCore.WebSockets (1)
WebSocketMiddleware.cs (1)
89private sealed class WebSocketHandshake : IHttpWebSocketFeature
48 references to IHttpWebSocketFeature
Microsoft.AspNetCore.Components.Server (5)
DependencyInjection\ServerRazorComponentsBuilderExtensions.cs (5)
96var currentFeature = ctx.Features.Get<IHttpWebSocketFeature>(); 98ctx.Features.Set<IHttpWebSocketFeature>(new ServerComponentsSocketFeature(currentFeature!, ctx, configureConnection, disableCompression)); 162IHttpWebSocketFeature originalFeature, 166: IHttpWebSocketFeature
Microsoft.AspNetCore.Http (3)
Internal\DefaultWebSocketManager.cs (3)
14private static readonly Func<IFeatureCollection, IHttpWebSocketFeature?> _nullWebSocketFeature = f => null; 42private IHttpWebSocketFeature WebSocketFeature => 80public IHttpWebSocketFeature? WebSockets;
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionDispatcher.cs (1)
444return features.Get<IHttpWebSocketFeature>() != null;
Microsoft.AspNetCore.Http.Connections.Tests (9)
HttpConnectionDispatcherTests.cs (8)
263context.Features.Set<IHttpWebSocketFeature>(new TestWebSocketConnectionFeature()); 491var ws = (TestWebSocketConnectionFeature)context.Features.Get<IHttpWebSocketFeature>(); 1462var ws = (TestWebSocketConnectionFeature)context1.Features.Get<IHttpWebSocketFeature>(); 2402var websocketFeature = (TestWebSocketConnectionFeature)context.Features.Get<IHttpWebSocketFeature>(); 2434websocketFeature = (TestWebSocketConnectionFeature)context.Features.Get<IHttpWebSocketFeature>(); 2476var websocketFeature = (TestWebSocketConnectionFeature)context.Features.Get<IHttpWebSocketFeature>(); 2861var websocket = (TestWebSocketConnectionFeature)context.Features.Get<IHttpWebSocketFeature>(); 3755context.Features.Set<IHttpWebSocketFeature>(new TestWebSocketConnectionFeature(sync));
WebSocketsTests.cs (1)
375context.Features.Set<IHttpWebSocketFeature>(feature);
Microsoft.AspNetCore.Http.Tests (2)
DefaultHttpContextTests.cs (2)
156features.Set<IHttpWebSocketFeature>(new TestHttpWebSocketFeature()); 176newFeatures.Set<IHttpWebSocketFeature>(new TestHttpWebSocketFeature());
Microsoft.AspNetCore.Owin (5)
OwinEnvironment.cs (1)
129_entries.Add(OwinConstants.WebSocket.AcceptAlt, new FeatureMap<IHttpWebSocketFeature>(feature => new WebSocketAcceptAlt(feature.AcceptAsync)));
OwinFeatureCollection.cs (4)
303bool IHttpWebSocketFeature.IsWebSocketRequest 311Task<WebSocket> IHttpWebSocketFeature.AcceptAsync(WebSocketAcceptContext context) 353else if (key == typeof(IHttpWebSocketFeature)) 416yield return new KeyValuePair<Type, object>(typeof(IHttpWebSocketFeature), this);
Microsoft.AspNetCore.Server.IIS (1)
Core\IISHttpContext.Features.cs (1)
24private static readonly Type IHttpWebSocketFeatureType = typeof(global::Microsoft.AspNetCore.Http.Features.IHttpWebSocketFeature);
Microsoft.AspNetCore.Server.Kestrel.Core (9)
Internal\Http\HttpProtocol.Generated.cs (9)
71internal protected IHttpWebSocketFeature? _currentIHttpWebSocketFeature; 280else if (key == typeof(IHttpWebSocketFeature)) 432else if (key == typeof(IHttpWebSocketFeature)) 434_currentIHttpWebSocketFeature = (IHttpWebSocketFeature?)value; 586else if (typeof(TFeature) == typeof(IHttpWebSocketFeature)) 588feature = Unsafe.As<IHttpWebSocketFeature?, TFeature?>(ref _currentIHttpWebSocketFeature); 746else if (typeof(TFeature) == typeof(IHttpWebSocketFeature)) 748_currentIHttpWebSocketFeature = Unsafe.As<TFeature?, IHttpWebSocketFeature?>(ref feature); 896yield return new KeyValuePair<Type, object>(typeof(IHttpWebSocketFeature), _currentIHttpWebSocketFeature);
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (2)
HttpProtocolFeatureCollection.cs (2)
159public IHttpWebSocketFeature Get_IHttpWebSocketFeature() 161return _collection.Get<IHttpWebSocketFeature>();
Microsoft.AspNetCore.TestHost (3)
WebSocketClient.cs (3)
92context.Features.Set<IHttpWebSocketFeature>(webSocketFeature); 129bool IHttpWebSocketFeature.IsWebSocketRequest => true; 135async Task<WebSocket> IHttpWebSocketFeature.AcceptAsync(WebSocketAcceptContext context)
Microsoft.AspNetCore.TestHost.Tests (4)
TestClientTests.cs (2)
1033var webSocketFeature = c.Features.Get<IHttpWebSocketFeature>();
WebSocketClientTests.cs (2)
107var webSocketFeature = c.Features.Get<IHttpWebSocketFeature>();
Microsoft.AspNetCore.WebSockets (4)
WebSocketMiddleware.cs (4)
18/// Enables accepting WebSocket requests by adding a <see cref="IHttpWebSocketFeature"/> 52/// sets the <see cref="IHttpWebSocketFeature"/> on the <see cref="HttpContext.Features"/>. 61if ((upgradeFeature != null || connectFeature != null) && context.Features.Get<IHttpWebSocketFeature>() == null) 64context.Features.Set<IHttpWebSocketFeature>(webSocketFeature);