Sockets on Solaris

Simon Marlow simonmar@microsoft.com
Tue, 13 Nov 2001 16:54:55 -0000


>     I'm having trouble using the Socket module on
> Solaris.
>=20
> The following program:
>=20
> import System
> import Socket
> import IO
>=20
> main =3D
>     do
>     d <- connectTo "localhost" (PortNumber  80)
>     hPutStr d "GET / HTTP/1.0\n\n"
>     hFlush d
>     c  <- (hGetContents d)
>     putStr c
>=20
>  =20
> fails with:
>=20
> Fail: invalid argument
> Action: getSocketOption
> Reason: Invalid argument

It turns out there is still a problem with SocketPrim.getSocketOpt
(which is used indirectly by Socket.connectTo) which shows up on
Solaris.  It'll be fixed in 5.02.2.

Cheers,
	Simon