[Modify] Polish it
This commit is contained in:
parent
8b48f224ea
commit
842b5b3b3a
@ -1109,7 +1109,7 @@ namespace WebSocketSharp
|
||||
new CloseEventArgs (code, reason ?? code.GetMessage ()), !code.IsReserved (), false, false);
|
||||
}
|
||||
|
||||
private bool processFragmentedFrame (WebSocketFrame frame)
|
||||
private bool processFragmentFrame (WebSocketFrame frame)
|
||||
{
|
||||
if (!_inContinuation) {
|
||||
// Must process first fragment.
|
||||
@ -1165,8 +1165,8 @@ namespace WebSocketSharp
|
||||
return processUnsupportedFrame (frame, CloseStatusCode.ProtocolError, msg);
|
||||
|
||||
frame.Unmask ();
|
||||
return frame.IsFragmented
|
||||
? processFragmentedFrame (frame)
|
||||
return frame.IsFragment
|
||||
? processFragmentFrame (frame)
|
||||
: frame.IsData
|
||||
? processDataFrame (frame)
|
||||
: frame.IsPing
|
||||
|
@ -214,7 +214,7 @@ namespace WebSocketSharp
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsFragmented {
|
||||
public bool IsFragment {
|
||||
get {
|
||||
return _fin == Fin.More || _opcode == Opcode.Cont;
|
||||
}
|
||||
@ -403,8 +403,7 @@ namespace WebSocketSharp
|
||||
? String.Empty
|
||||
: payloadLen > 125
|
||||
? "---"
|
||||
: frame.IsText &&
|
||||
!(frame.IsMasked || frame.IsFragmented || frame.IsCompressed)
|
||||
: frame.IsText && !(frame.IsFragment || frame.IsMasked || frame.IsCompressed)
|
||||
? frame._payloadData.ApplicationData.UTF8Decode ()
|
||||
: frame._payloadData.ToString ();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user