
14 Oct
2005
14 Oct
'05
9:47 a.m.
Hi, I've a problem, I'm using this code on GHC compiler version 6.4.1: --- BEGIN --- module Main where import System.IO import Network main = withSocketsDo $ do handle <- connectTo "localhost" ( PortNumber 8080 ) hSetBuffering handle LineBuffering hClose handle --- END --- The problems is that it throws an exception at connectTo, the exception is: getServiceEntry: does not exist (no such service entry) The server and the port is correct, I have apache listening on port 8080 and if I put http://localhost:8080/ on browser it loads a web page. Do somebody knows what it happens and how to fix it? thanks.