Open bhesmans opened 2 years ago
func htons should take host endianness into account:
htons
func htons(i uint16) uint16 { return (i<<8)&0xff00 | i>>8 }
Depending on host endianness this should be a no-op or not.
The issue was spotted when trying to use this lib on a device with a different endianness...
func
htons
should take host endianness into account:Depending on host endianness this should be a no-op or not.
The issue was spotted when trying to use this lib on a device with a different endianness...