
7 Dec
2000
7 Dec
'00
10:56 a.m.
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? -- \usepackage[latin1]{inputenc}! Volker Stolz * stolz@i2.informatik.rwth-aachen.de * PGP + S/MIME