[Modify] Add it

This commit is contained in:
sta 2018-11-08 19:45:52 +09:00
parent 5f01dfe31f
commit b7a095a445

View File

@ -594,6 +594,18 @@ namespace WebSocketSharp.Net
output.WriteByte ((byte) _hexChars[idx]);
}
private static byte[] urlEncodeToBytes (byte[] bytes, int offset, int count)
{
using (var buff = new MemoryStream ()) {
var end = offset + count - 1;
for (var i = offset; i <= end; i++)
urlEncode (bytes[i], buff);
buff.Close ();
return buff.ToArray ();
}
}
private static void urlEncodeUnicode (char c, Stream output)
{
if (c > 31 && c < 127) {