在 Haskellnetwork
包中
bindSocket
用途HostAddress
和HostAddress6
定义为:
-- | Network byte order.
type HostAddress = Word32
-- | Host byte order.
type HostAddress6 = (Word32, Word32, Word32, Word32)
- 我怎样才能从
123.123.123.123
到Word32
? - 我怎样才能从一个
IPv6
字符串去(Word32, Word32, Word32, Word32)
? - 字节序是否在不同的操作系统(Windows、Linux、OS X、FreeBSD)上起作用?