64 references to WebSocketState
System (45)
net\System\Net\WebSockets\ClientWebSocket.cs (5)
94
public override
WebSocketState
State
106
return
WebSocketState
.None;
108
return
WebSocketState
.Connecting;
110
return
WebSocketState
.Closed;
113
return
WebSocketState
.Closed;
net\System\Net\WebSockets\WebSocket.cs (7)
23
public abstract
WebSocketState
State { get; }
142
protected static void ThrowOnInvalidState(
WebSocketState
state, params
WebSocketState
[] validStates)
148
foreach (
WebSocketState
currentState in validStates)
162
protected static bool IsStateTerminal(
WebSocketState
state)
164
return state ==
WebSocketState
.Closed ||
165
state ==
WebSocketState
.Aborted;
net\System\Net\WebSockets\WebSocketBase.cs (29)
59
private volatile
WebSocketState
m_State;
113
m_State =
WebSocketState
.Open;
142
public override
WebSocketState
State
146
Contract.Assert(m_State !=
WebSocketState
.None, "'m_State' MUST NOT be 'WebSocketState.None'.");
219
ThrowOnInvalidState(State,
WebSocketState
.Open,
WebSocketState
.CloseSent);
324
ThrowOnInvalidState(State,
WebSocketState
.Open,
WebSocketState
.CloseReceived);
465
m_State =
WebSocketState
.Aborted;
557
ThrowOnInvalidState(State,
WebSocketState
.Open,
WebSocketState
.CloseReceived);
669
case
WebSocketState
.Open:
670
m_State =
WebSocketState
.CloseSent;
672
case
WebSocketState
.CloseReceived:
698
m_State =
WebSocketState
.Closed;
798
WebSocketState
.Open,
WebSocketState
.CloseReceived,
WebSocketState
.CloseSent);
805
if (closeOutputTask == null && State !=
WebSocketState
.CloseSent)
1261
if (State ==
WebSocketState
.Closed || State ==
WebSocketState
.Aborted)
1273
SR.GetString(SR.net_WebSockets_InvalidState_ClosedOrAborted, GetType().FullName,
WebSocketState
.Aborted),
1282
if (State !=
WebSocketState
.Closed)
1484
if (IsStateTerminal(State) || State ==
WebSocketState
.CloseReceived)
1490
if (IsStateTerminal(State) || State ==
WebSocketState
.CloseReceived)
1495
if (State ==
WebSocketState
.Open)
1497
m_State =
WebSocketState
.CloseReceived;
1550
thisPtr.m_State !=
WebSocketState
.Open ||
1792
if (m_WebSocket.State !=
WebSocketState
.CloseSent ||
net\System\Net\WebSockets\WebSocketBuffer.cs (4)
120
public void Dispose(
WebSocketState
webSocketState)
132
this.Dispose(
WebSocketState
.None);
563
case (int)
WebSocketState
.Closed:
564
case (int)
WebSocketState
.Aborted:
System.ServiceModel (5)
System\ServiceModel\Channels\ClientWebSocketTransportDuplexSessionChannel.cs (1)
533
else if (ws.State !=
WebSocketState
.Open)
System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (4)
1462
if (!this.endofMessageReceived && (this.webSocket.State ==
WebSocketState
.Open || this.webSocket.State ==
WebSocketState
.CloseSent))
1472
while (!this.endofMessageReceived && (this.webSocket.State ==
WebSocketState
.Open || this.webSocket.State ==
WebSocketState
.CloseSent));
System.Web (14)
WebSocketPipeline.cs (1)
135
if (webSocket.State !=
WebSocketState
.Aborted) {
WebSockets\AspNetWebSocket.cs (13)
97
internal
WebSocketState
_state =
WebSocketState
.Open;
136
public override
WebSocketState
State {
182
_state =
WebSocketState
.Aborted;
345
case
WebSocketState
.Open:
346
_state =
WebSocketState
.CloseSent;
349
case
WebSocketState
.CloseReceived:
350
_state =
WebSocketState
.Closed;
411
case
WebSocketState
.Open:
412
_state =
WebSocketState
.CloseReceived;
415
case
WebSocketState
.CloseSent:
416
_state =
WebSocketState
.Closed;
534
if (_state ==
WebSocketState
.Aborted) {