[Modify] Polish it
This commit is contained in:
parent
6357649fe5
commit
633f13ed59
@ -445,8 +445,10 @@ Extended Payload Length: {7}
|
|||||||
|
|
||||||
private static WebSocketFrame processHeader (byte[] header)
|
private static WebSocketFrame processHeader (byte[] header)
|
||||||
{
|
{
|
||||||
if (header.Length != 2)
|
if (header.Length != 2) {
|
||||||
throw new WebSocketException ("The header of a frame cannot be read from the stream.");
|
var msg = "The header part of a frame could not be read.";
|
||||||
|
throw new WebSocketException (msg);
|
||||||
|
}
|
||||||
|
|
||||||
// FIN
|
// FIN
|
||||||
var fin = (header[0] & 0x80) == 0x80 ? Fin.Final : Fin.More;
|
var fin = (header[0] & 0x80) == 0x80 ? Fin.Final : Fin.More;
|
||||||
|
Loading…
Reference in New Issue
Block a user