[Modify] Polish it
This commit is contained in:
parent
14bbf8a3ad
commit
d29f8b5543
@ -570,13 +570,15 @@ namespace WebSocketSharp
|
|||||||
return unquote ? val.Unquote () : val;
|
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 ())
|
if (!order.IsHostOrder ())
|
||||||
Array.Reverse (bytes);
|
Array.Reverse (ret);
|
||||||
|
|
||||||
return bytes;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static byte[] InternalToByteArray (this ulong value, ByteOrder order)
|
internal static byte[] InternalToByteArray (this ulong value, ByteOrder order)
|
||||||
|
Loading…
Reference in New Issue
Block a user