Removed the checkIfCanAccept method
This commit is contained in:
parent
1d403af6bf
commit
d07e9cb5e9
@ -686,13 +686,6 @@ namespace WebSocketSharp
|
|||||||
: _readyState.CheckIfAvailable (connecting, open, closing, closed);
|
: _readyState.CheckIfAvailable (connecting, open, closing, closed);
|
||||||
}
|
}
|
||||||
|
|
||||||
private string checkIfCanAccept ()
|
|
||||||
{
|
|
||||||
return _client
|
|
||||||
? "This operation isn't available in the client."
|
|
||||||
: _readyState.CheckIfAvailable (true, false, false, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// As server
|
// As server
|
||||||
private string checkIfValidHandshakeRequest (WebSocketContext context)
|
private string checkIfValidHandshakeRequest (WebSocketContext context)
|
||||||
{
|
{
|
||||||
@ -1820,7 +1813,7 @@ namespace WebSocketSharp
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
public void Accept ()
|
public void Accept ()
|
||||||
{
|
{
|
||||||
var msg = checkIfCanAccept ();
|
var msg = checkIfAvailable (false, true, true, false, false, false);
|
||||||
if (msg != null) {
|
if (msg != null) {
|
||||||
_logger.Error (msg);
|
_logger.Error (msg);
|
||||||
error ("An error has occurred in accepting.", null);
|
error ("An error has occurred in accepting.", null);
|
||||||
@ -1845,7 +1838,7 @@ namespace WebSocketSharp
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
public void AcceptAsync ()
|
public void AcceptAsync ()
|
||||||
{
|
{
|
||||||
var msg = checkIfCanAccept ();
|
var msg = checkIfAvailable (false, true, true, false, false, false);
|
||||||
if (msg != null) {
|
if (msg != null) {
|
||||||
_logger.Error (msg);
|
_logger.Error (msg);
|
||||||
error ("An error has occurred in accepting.", null);
|
error ("An error has occurred in accepting.", null);
|
||||||
|
Loading…
Reference in New Issue
Block a user