WebSocketOpCode: Add IsValid check

Not used, but useful addition.
This commit is contained in:
tt2468 2021-12-10 21:59:13 -08:00
parent fcbe11616d
commit b66d2284b3

View File

@ -121,4 +121,9 @@ namespace WebSocketOpCode {
*/
RequestBatchResponse = 9,
};
inline bool IsValid(uint8_t opCode)
{
return opCode >= Hello && opCode <= RequestBatchResponse;
}
}