HttpContext.IsWebSocketRequest 属性

定义

获取一个值,该值指示请求是否为 AspNetWebSocket 请求。

public:
 property bool IsWebSocketRequest { bool get(); };
public bool IsWebSocketRequest { get; }
member this.IsWebSocketRequest : bool
Public ReadOnly Property IsWebSocketRequest As Boolean

属性值

true 如果请求是请求 AspNetWebSocket ,则为 :否则为 false

注解

如果请求包含初始AspNetWebSocket握手,并且 IIS 的模块处于活动状态,WebSocket则此方法返回true

适用于