Network library: getting host address

Manuel M T Chakravarty chak at cse.unsw.edu.au
Sun Jul 3 10:57:50 EDT 2005


Forget that, I was talking nonsense (except for the issue of
re-exporting the mentioned constants).

Manuel

28.06.2005, 23:38 +1000 Manuel M T Chakravarty:
> Is there any good reason why I can get a bound socket's port with
> getPortSocket, but cannot get its host address (ie, IP number)?  Sure,
> this makes only sense for ip sockets, but there it is sometimes crucial
> to get at this information.
> 
> I can get the information using the lower-level Network.Socket using
> 
> >  SockAddrInet _ hostAddr <- getSocketName socket
> >  host <- inet_ntoa hostAddr
> 
> but I think that this is the kind of information that needs to be
> available in the high-level interface, too.
> 
> BTW, shouldn't Network also reexport constants, such as aNY_PORT and
> iNADDR_ANY.
> 
> Manuel
> 
> 
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
-- 



More information about the Libraries mailing list