diff --git a/websocket-sharp/Ext.cs b/websocket-sharp/Ext.cs
index 3dbc28ba..47b0d1e0 100644
--- a/websocket-sharp/Ext.cs
+++ b/websocket-sharp/Ext.cs
@@ -233,13 +233,6 @@ namespace WebSocketSharp
: null;
}
- internal static string CheckIfConnectable (this WebSocketState state)
- {
- return state == WebSocketState.Open || state == WebSocketState.Closing
- ? "A WebSocket connection has already been established."
- : null;
- }
-
internal static string CheckIfOpen (this WebSocketState state)
{
return state == WebSocketState.Connecting
diff --git a/websocket-sharp/WebSocket.cs b/websocket-sharp/WebSocket.cs
index 2f83aadc..0d7061be 100644
--- a/websocket-sharp/WebSocket.cs
+++ b/websocket-sharp/WebSocket.cs
@@ -646,19 +646,19 @@ namespace WebSocketSharp
return sendHttpResponse (createHandshakeResponse ());
}
- private string checkIfAvailable (bool asServer, bool asConnected)
+ private string checkIfAvailable (bool server, bool connected)
{
- return !_client && !asServer
- ? "This operation isn't available as a server."
- : !asConnected
- ? _readyState.CheckIfConnectable ()
+ return !server && !_client
+ ? "This operation isn't available in the server."
+ : !connected && IsConnected
+ ? "This operation isn't available after the connection has been established."
: null;
}
private string checkIfCanAccept ()
{
return _client
- ? "This operation isn't available as a client."
+ ? "This operation isn't available in the client."
: _readyState.CheckIfCanAccept ();
}
@@ -1755,7 +1755,7 @@ namespace WebSocketSharp
/// Accepts the WebSocket connection request.
///
///
- /// This method isn't available as a client.
+ /// This method isn't available in the client.
///
public void Accept ()
{
@@ -1779,7 +1779,7 @@ namespace WebSocketSharp
/// This method doesn't wait for the accept to be complete.
///
///
- /// This method isn't available as a client.
+ /// This method isn't available in the client.
///
///
public void AcceptAsync ()