共用方式為


WebSocketManager.AcceptWebSocketAsync 方法

定義

多載

AcceptWebSocketAsync()

將要求轉換為 WebSocket 連線。

AcceptWebSocketAsync(WebSocketAcceptContext)
AcceptWebSocketAsync(String)

使用指定的子通訊協定,將要求轉換為 WebSocket 連線。

AcceptWebSocketAsync()

來源:
WebSocketManager.cs
來源:
WebSocketManager.cs
來源:
WebSocketManager.cs

將要求轉換為 WebSocket 連線。

public:
 virtual System::Threading::Tasks::Task<System::Net::WebSockets::WebSocket ^> ^ AcceptWebSocketAsync();
public virtual System.Threading.Tasks.Task<System.Net.WebSockets.WebSocket> AcceptWebSocketAsync ();
abstract member AcceptWebSocketAsync : unit -> System.Threading.Tasks.Task<System.Net.WebSockets.WebSocket>
override this.AcceptWebSocketAsync : unit -> System.Threading.Tasks.Task<System.Net.WebSockets.WebSocket>
Public Overridable Function AcceptWebSocketAsync () As Task(Of WebSocket)

傳回

表示轉換完成的工作。

適用於

AcceptWebSocketAsync(WebSocketAcceptContext)

來源:
WebSocketManager.cs
public virtual System.Threading.Tasks.Task<System.Net.WebSockets.WebSocket> AcceptWebSocketAsync (Microsoft.AspNetCore.Http.WebSocketAcceptContext acceptContext);
abstract member AcceptWebSocketAsync : Microsoft.AspNetCore.Http.WebSocketAcceptContext -> System.Threading.Tasks.Task<System.Net.WebSockets.WebSocket>
override this.AcceptWebSocketAsync : Microsoft.AspNetCore.Http.WebSocketAcceptContext -> System.Threading.Tasks.Task<System.Net.WebSockets.WebSocket>
Public Overridable Function AcceptWebSocketAsync (acceptContext As WebSocketAcceptContext) As Task(Of WebSocket)

參數

acceptContext
WebSocketAcceptContext

傳回

適用於

AcceptWebSocketAsync(String)

來源:
WebSocketManager.cs
來源:
WebSocketManager.cs
來源:
WebSocketManager.cs

使用指定的子通訊協定,將要求轉換為 WebSocket 連線。

public:
 abstract System::Threading::Tasks::Task<System::Net::WebSockets::WebSocket ^> ^ AcceptWebSocketAsync(System::String ^ subProtocol);
public abstract System.Threading.Tasks.Task<System.Net.WebSockets.WebSocket> AcceptWebSocketAsync (string subProtocol);
public abstract System.Threading.Tasks.Task<System.Net.WebSockets.WebSocket> AcceptWebSocketAsync (string? subProtocol);
abstract member AcceptWebSocketAsync : string -> System.Threading.Tasks.Task<System.Net.WebSockets.WebSocket>
Public MustOverride Function AcceptWebSocketAsync (subProtocol As String) As Task(Of WebSocket)

參數

subProtocol
String

要使用的子通訊協定。

傳回

表示轉換完成的工作。

適用於