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