instance Show SockAddr

Simon Marlow simonmar at microsoft.com
Mon Oct 18 05:18:00 EDT 2004


On 17 October 2004 10:38, Graham Klyne wrote:

> At 11:09 16/10/04 +0200, Tomasz Zielonka wrote:
>> On Sat, Oct 16, 2004 at 09:37:02AM +0100, Graham Klyne wrote:
>>> 
>>> It seems to me that using a single integer/bitstring value for
>>> internal representation of IP addresses is rather missing a trick.
>> 
>> But that's just what IP4 address is: 32 bits
> 
> Well, on the wire it's 32 bits, but from an application's viewpoint,
> IMO, it's an abstract value that is used to address an endpoint. 
> From the user's PoV, it's (usually) four decimal numbers separated by
> '.'. 

Absolutely.  Network.Socket exports HostAddress as a Word32 in network
byte order because it is a low-level library - a higher-level
abstraction layer should definitely provide an abstract version of this.
We don't have a good higher-level network library, though (Network is a
bit feeble).

Cheers,
	Simon


More information about the Libraries mailing list