|
|
|
|
@ -240,13 +240,17 @@ namespace WebSocketSharp.Server
|
|
|
|
|
/// </value>
|
|
|
|
|
public IEnumerable<IWebSocketSession> Sessions {
|
|
|
|
|
get {
|
|
|
|
|
if (_state == ServerState.ShuttingDown)
|
|
|
|
|
return new IWebSocketSession[0];
|
|
|
|
|
if (_state != ServerState.Start)
|
|
|
|
|
return Enumerable.Empty<IWebSocketSession> ();
|
|
|
|
|
|
|
|
|
|
lock (_sync) {
|
|
|
|
|
if (_state != ServerState.Start)
|
|
|
|
|
return Enumerable.Empty<IWebSocketSession> ();
|
|
|
|
|
|
|
|
|
|
lock (_sync)
|
|
|
|
|
return _sessions.Values.ToList ();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the wait time for the response to the WebSocket Ping or Close.
|
|
|
|
|
|