[Modify] Add it

This commit is contained in:
sta 2020-01-01 17:10:01 +09:00
parent 93db5dba56
commit 21cb8a0e24

View File

@ -652,6 +652,19 @@ namespace WebSocketSharp
return value > 0 && value < 65536;
}
internal static bool IsPrintable (this string value)
{
foreach (var c in value) {
if (c < 0x20)
return false;
if (c > 0x7e)
return false;
}
return true;
}
internal static bool IsReserved (this ushort code)
{
return code == 1004