diff --git a/websocket-sharp/WebSocket.cs b/websocket-sharp/WebSocket.cs index 1ebbc6eb..4ce4aeb5 100644 --- a/websocket-sharp/WebSocket.cs +++ b/websocket-sharp/WebSocket.cs @@ -676,6 +676,16 @@ namespace WebSocketSharp : null; } + private string checkIfAvailable ( + bool client, bool server, bool connecting, bool open, bool closing, bool closed) + { + return !client && _client + ? "This operation isn't available in the client." + : !server && !_client + ? "This operation isn't available in the server." + : _readyState.CheckIfAvailable (connecting, open, closing, closed); + } + private string checkIfCanAccept () { return _client