[Modify] Add it
This commit is contained in:
parent
296ede4c33
commit
8478bfd9ba
@ -841,6 +841,31 @@ namespace WebSocketSharp
|
|||||||
return checkIfAvailable (connecting, open, closing, closed, out message);
|
return checkIfAvailable (connecting, open, closing, closed, out message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static bool checkParametersForSetCredentials (
|
||||||
|
string username, string password, out string message
|
||||||
|
)
|
||||||
|
{
|
||||||
|
message = null;
|
||||||
|
|
||||||
|
if (username.IsNullOrEmpty ())
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (username.Contains (':') || !username.IsText ()) {
|
||||||
|
message = "'username' contains an invalid character.";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (password.IsNullOrEmpty ())
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (!password.IsText ()) {
|
||||||
|
message = "'password' contains an invalid character.";
|
||||||
|
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