[Modify] Add it

This commit is contained in:
sta 2020-01-19 17:22:47 +09:00
parent 946bf20b65
commit 0ef4171add

View File

@ -820,6 +820,25 @@ namespace WebSocketSharp.Net
_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 (
string value, Encoding encoding
)