[Modify] For long length data
This commit is contained in:
parent
0ef4171add
commit
eb10d30220
@ -999,11 +999,17 @@ namespace WebSocketSharp.Net
|
|||||||
if (responseEntity == null)
|
if (responseEntity == null)
|
||||||
throw new ArgumentNullException ("responseEntity");
|
throw new ArgumentNullException ("responseEntity");
|
||||||
|
|
||||||
var len = responseEntity.Length;
|
var len = responseEntity.LongLength;
|
||||||
|
|
||||||
|
if (len > Int32.MaxValue) {
|
||||||
|
close (responseEntity, 1024, willBlock);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var output = OutputStream;
|
var output = OutputStream;
|
||||||
|
|
||||||
if (willBlock) {
|
if (willBlock) {
|
||||||
output.Write (responseEntity, 0, len);
|
output.Write (responseEntity, 0, (int) len);
|
||||||
close (false);
|
close (false);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@ -1012,7 +1018,7 @@ namespace WebSocketSharp.Net
|
|||||||
output.BeginWrite (
|
output.BeginWrite (
|
||||||
responseEntity,
|
responseEntity,
|
||||||
0,
|
0,
|
||||||
len,
|
(int) len,
|
||||||
ar => {
|
ar => {
|
||||||
output.EndWrite (ar);
|
output.EndWrite (ar);
|
||||||
close (false);
|
close (false);
|
||||||
|
Loading…
Reference in New Issue
Block a user