[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);
}
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

View File

@ -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 ();