Method GetWebSocketAsync
GetWebSocketAsync(string?, string?)
Asynchronously accepts and acquires a websocket for this request. Calling this method will put this HttpRequest instance in streaming state.
public Task<HttpWebSocket> GetWebSocketAsync(string? subprotocol = null, string? identifier = null)
Parameters
subprotocolstringOptional. Determines the sub-protocol to plug the websocket in.
identifierstringOptional. Defines an label to the Web Socket connection, useful for finding this connection's reference later.
Returns
- Task<HttpWebSocket>
A task that represents the asynchronous operation, returning an instance of HttpWebSocket representing the accepted websocket connection.
English
Русский
Português
Español
Deutsch
中文 (简体)
日本語