[Modify] Add it
This commit is contained in:
parent
c128ea7b7b
commit
437896fc9c
@ -793,6 +793,23 @@ namespace WebSocketSharp
|
|||||||
: _readyState.CheckIfAvailable (connecting, open, closing, closed);
|
: _readyState.CheckIfAvailable (connecting, open, closing, closed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool checkIfAvailable (bool client, bool server, out string message)
|
||||||
|
{
|
||||||
|
message = null;
|
||||||
|
|
||||||
|
if (!client && _client) {
|
||||||
|
message = "This operation isn't available in: client";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!server && !_client) {
|
||||||
|
message = "This operation isn't available in: server";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
private bool checkReceivedFrame (WebSocketFrame frame, out string message)
|
private bool checkReceivedFrame (WebSocketFrame frame, out string message)
|
||||||
{
|
{
|
||||||
message = null;
|
message = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user