Exclude Continuations from Frame.Type

This commit is contained in:
Joakim Erdfelt 2012-11-05 17:57:04 -07:00
parent 053f91c8a0
commit b37bd2b665
1 changed files with 6 additions and 0 deletions

View File

@ -35,6 +35,12 @@ public interface Frame extends javax.net.websocket.extensions.Frame
public static Type from(byte op)
{
if (op == 0)
{
// continuation has no type, but is a valid opcode.
return null;
}
for (Type type : values())
{
if (type.opcode == op)