WebSocket::ThrowOnInvalidState Method (WebSocketState, array<WebSocketState>^)
.NET Framework (current version)
Verifies that the connection is in an expected state.
Assembly: System (in System.dll)
protected: static void ThrowOnInvalidState( WebSocketState state, ... array<WebSocketState>^ validStates )
Parameters
- state
-
Type:
System.Net.WebSockets::WebSocketState
The current state of the WebSocket to be tested against the list of valid states.
- validStates
-
Type:
array<System.Net.WebSockets::WebSocketState>^
List of valid connection states.
.NET Framework
Available since 4.5
Available since 4.5
Show: