Fix a few for Chunk.cs

This commit is contained in:
sta 2014-05-20 11:03:22 +09:00
parent 22778052f3
commit 142fc2213d
2 changed files with 3 additions and 9 deletions

View File

@ -61,15 +61,9 @@ namespace WebSocketSharp.Net
#region Public Properties #region Public Properties
public int Length { public int ReadLeft {
get { get {
return _data.Length; return _data.Length - _offset;
}
}
public int Offset {
get {
return _offset;
} }
} }

View File

@ -134,7 +134,7 @@ namespace WebSocketSharp.Net
if (chunk == null) if (chunk == null)
continue; continue;
if (chunk.Offset == chunk.Length) { if (chunk.ReadLeft == 0) {
_chunks [i] = null; _chunks [i] = null;
continue; continue;
} }