WebSocketMiddlewareExtensions.UseWebSockets 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
UseWebSockets(IApplicationBuilder) |
將 WebSocketMiddleware 加入至要求管線。 |
UseWebSockets(IApplicationBuilder, WebSocketOptions) |
將 WebSocketMiddleware 加入至要求管線。 |
UseWebSockets(IApplicationBuilder)
將 WebSocketMiddleware 加入至要求管線。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseWebSockets(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseWebSockets (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
static member UseWebSockets : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseWebSockets (app As IApplicationBuilder) As IApplicationBuilder
參數
要設定的 IApplicationBuilder。
傳回
適用於
UseWebSockets(IApplicationBuilder, WebSocketOptions)
將 WebSocketMiddleware 加入至要求管線。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseWebSockets(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Microsoft::AspNetCore::Builder::WebSocketOptions ^ options);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseWebSockets (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.WebSocketOptions options);
static member UseWebSockets : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Builder.WebSocketOptions -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseWebSockets (app As IApplicationBuilder, options As WebSocketOptions) As IApplicationBuilder
參數
要設定的 IApplicationBuilder。
- options
- WebSocketOptions