[Modify] Polish it

This commit is contained in:
sta 2019-07-24 21:08:04 +09:00
parent 14bbf8a3ad
commit d29f8b5543

View File

@ -570,13 +570,15 @@ namespace WebSocketSharp
return unquote ? val.Unquote () : val;
}
internal static byte[] InternalToByteArray (this ushort value, ByteOrder order)
internal static byte[] InternalToByteArray (
this ushort value, ByteOrder order
)
{
var bytes = BitConverter.GetBytes (value);
var ret = BitConverter.GetBytes (value);
if (!order.IsHostOrder ())
Array.Reverse (bytes);
Array.Reverse (ret);
return bytes;
return ret;
}
internal static byte[] InternalToByteArray (this ulong value, ByteOrder order)