Anyone using SocketPrim.getSocketName?

Volker Stolz stolz@I2.Informatik.RWTH-Aachen.DE
Thu, 7 Dec 2000 11:56:09 +0100

Is anyone using SocketPrimt.getSocketName?
I try to get the IP of a listening socket (on my side), but
I always get 0. It could be either my fault, SocketPrims fault
(the source is prefilling the buffer with 0!), or the
conversion-functions fault:

>   sAddr <- SocketPrim.getSocketName (s#socket)
>   local <- case sAddr of
>     (SocketPrim.SockAddrInet port host) -> do
>	  return (show (wordToWord32 host))
>     _ -> net#getHostName -- XXX output a warning 
>   print local

"host" is of type Word, so I need a way of getting it into a string.
host should be 4x8 bit and thus Word32 is the right thing to use?
Volker Stolz * * PGP + S/MIME