[Modify] Polish it

This commit is contained in:
sta 2019-07-25 20:08:16 +09:00
parent d29f8b5543
commit e3201e336f

View File

@ -581,13 +581,16 @@ namespace WebSocketSharp
return ret; return ret;
} }
internal static byte[] InternalToByteArray (this ulong value, ByteOrder order) internal static byte[] InternalToByteArray (
this ulong value, ByteOrder order
)
{ {
var bytes = BitConverter.GetBytes (value); var ret = BitConverter.GetBytes (value);
if (!order.IsHostOrder ())
Array.Reverse (bytes);
return bytes; if (!order.IsHostOrder ())
Array.Reverse (ret);
return ret;
} }
internal static bool IsCompressionExtension ( internal static bool IsCompressionExtension (