Errors using connectTo in Sockets

Peter Logarn md9logge@mdstud.chalmers.se
Mon, 15 Oct 2001 16:43:32 +0200 (MET DST)


Hi!

Does anyone know why I can't use the connectTo function
in the library Socket included with ghc?

If I try to run the following code:

Prelude> Socket.connectTo "193.237.240.100" (Socket.PortNumber 21)

I get the following error:

*** Exception: invalid argument
Action: getSocketOption
Reason: Invalid argument

I'm trying to connect to a ftp-server. I can see on the server that a
connection is made, but the haskell program crashes.

I have also tried to connect to a webserver, but that generates the
same error.

Process> Socket.connectTo "hem.passagen.se" (Socket.Service "http")
*** Exception: invalid argument
Action: getSocketOption
Reason: Invalid argument

Thanks,

Peter Logarn