[Modify] Polish it

This commit is contained in:
sta 2015-12-12 15:26:05 +09:00
parent 8b48f224ea
commit 842b5b3b3a
2 changed files with 5 additions and 6 deletions

View File

@ -1109,7 +1109,7 @@ namespace WebSocketSharp
new CloseEventArgs (code, reason ?? code.GetMessage ()), !code.IsReserved (), false, false); new CloseEventArgs (code, reason ?? code.GetMessage ()), !code.IsReserved (), false, false);
} }
private bool processFragmentedFrame (WebSocketFrame frame) private bool processFragmentFrame (WebSocketFrame frame)
{ {
if (!_inContinuation) { if (!_inContinuation) {
// Must process first fragment. // Must process first fragment.
@ -1165,8 +1165,8 @@ namespace WebSocketSharp
return processUnsupportedFrame (frame, CloseStatusCode.ProtocolError, msg); return processUnsupportedFrame (frame, CloseStatusCode.ProtocolError, msg);
frame.Unmask (); frame.Unmask ();
return frame.IsFragmented return frame.IsFragment
? processFragmentedFrame (frame) ? processFragmentFrame (frame)
: frame.IsData : frame.IsData
? processDataFrame (frame) ? processDataFrame (frame)
: frame.IsPing : frame.IsPing

View File

@ -214,7 +214,7 @@ namespace WebSocketSharp
} }
} }
public bool IsFragmented { public bool IsFragment {
get { get {
return _fin == Fin.More || _opcode == Opcode.Cont; return _fin == Fin.More || _opcode == Opcode.Cont;
} }
@ -403,8 +403,7 @@ namespace WebSocketSharp
? String.Empty ? String.Empty
: payloadLen > 125 : payloadLen > 125
? "---" ? "---"
: frame.IsText && : frame.IsText && !(frame.IsFragment || frame.IsMasked || frame.IsCompressed)
!(frame.IsMasked || frame.IsFragmented || frame.IsCompressed)
? frame._payloadData.ApplicationData.UTF8Decode () ? frame._payloadData.ApplicationData.UTF8Decode ()
: frame._payloadData.ToString (); : frame._payloadData.ToString ();