[Modify] Polish it
This commit is contained in:
parent
514cccac12
commit
8359eadb8d
@ -463,12 +463,12 @@ Extended Payload Length: {7}
|
||||
// Check if valid header.
|
||||
var err = !opcode.IsSupported ()
|
||||
? "An unsupported opcode."
|
||||
: opcode.IsControl () && fin == Fin.More
|
||||
? "A control frame is fragmented."
|
||||
: opcode.IsControl () && payloadLen > 125
|
||||
? "A control frame has a long payload length."
|
||||
: !opcode.IsData () && rsv1 == Rsv.On
|
||||
? "A non data frame is compressed."
|
||||
: !opcode.IsData () && rsv1 == Rsv.On
|
||||
? "A non data frame is compressed."
|
||||
: opcode.IsControl () && fin == Fin.More
|
||||
? "A control frame is fragmented."
|
||||
: opcode.IsControl () && payloadLen > 125
|
||||
? "A control frame has a long payload length."
|
||||
: null;
|
||||
|
||||
if (err != null)
|
||||
|
Loading…
Reference in New Issue
Block a user