[Modify] Add it

This commit is contained in:
sta 2020-02-03 21:37:04 +09:00
parent b95ada27a8
commit 74461c4df5

View File

@ -211,6 +211,12 @@ namespace WebSocketSharp.Net
return true;
}
private static byte[] getChunkSizeBytes (int size)
{
var chunkSize = String.Format ("{0:x}\r\n", size);
return Encoding.ASCII.GetBytes (chunkSize);
}
private static byte[] getChunkSizeBytes (int size, bool final)
{
var chunkSize = String.Format ("{0:x}\r\n{1}", size, final ? "\r\n" : "");