Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

interface Microsoft.​AspNetCore.​Http.​Features.​IHttpWebSocketFeature

Assembly: Microsoft.AspNetCore.Http.Features

Provides access to server websocket features.

Properties

bool
IsWebSocketRequest
Indicates if this is a WebSocket upgrade request.

Methods

AcceptAsync​(WebSocketAcceptContext context)
Attempts to upgrade the request to a <see cref="T:System.Net.WebSockets.WebSocket" /> . Check <see cref="P:Microsoft.AspNetCore.Http.Features.IHttpWebSocketFeature.IsWebSocketRequest" /> before invoking this.
Returns A <see cref="T:System.Net.WebSockets.WebSocket" /> .
context The <see cref="T:Microsoft.AspNetCore.Http.WebSocketAcceptContext" /> .