Closed AlexeyRaga closed 9 years ago
This is not Integer
. That is HostAddress
defined in http://hackage.haskell.org/package/network-2.6.2.1/docs/Network-Socket-Internal.html#t:HostAddress
Unfortunately, HostAddress
is not in the host byte order but in the network byte order (big endian). (This is a dark side of the "network" library.) So, it is reversed on a littel endian machine.
Given:
21548033
is1.72.204.1
Test:
Could you please explain why octets are reversed? Or am I using
fromHostAddress
andtoHostAddress
incorrectly to convert from/to integers?