[Modify] Add it
This commit is contained in:
parent
946bf20b65
commit
0ef4171add
@ -820,6 +820,25 @@ namespace WebSocketSharp.Net
|
|||||||
_context.Connection.Close (force);
|
_context.Connection.Close (force);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void close (byte[] responseEntity, int bufferLength, bool willBlock)
|
||||||
|
{
|
||||||
|
var output = OutputStream;
|
||||||
|
|
||||||
|
if (willBlock) {
|
||||||
|
output.WriteBytes (responseEntity, bufferLength);
|
||||||
|
close (false);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
output.WriteBytesAsync (
|
||||||
|
responseEntity,
|
||||||
|
bufferLength,
|
||||||
|
() => close (false),
|
||||||
|
null
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
private static string createContentTypeHeaderText (
|
private static string createContentTypeHeaderText (
|
||||||
string value, Encoding encoding
|
string value, Encoding encoding
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user