[Modify] Polish it

This commit is contained in:
sta 2018-09-09 21:35:44 +09:00
parent d00b56de8a
commit 0b7c2208fa

View File

@ -716,15 +716,17 @@ namespace WebSocketSharp.Net
}
}
internal static byte[] InternalUrlEncodeToBytes (byte[] bytes, int offset, int count)
internal static byte[] InternalUrlEncodeToBytes (
byte[] bytes, int offset, int count
)
{
using (var res = new MemoryStream ()) {
using (var buff = new MemoryStream ()) {
var end = offset + count;
for (var i = offset; i < end; i++)
urlEncode ((char) bytes[i], res, false);
urlEncode ((char) bytes[i], buff, false);
res.Close ();
return res.ToArray ();
buff.Close ();
return buff.ToArray ();
}
}