[Haskell] Network Exception

Arias arias at radioreykjavik.net
Wed Oct 12 13:34:33 EDT 2005


My name Iván Arias, I'm trying to connect to a server using the Network 
library, the code that I'm using is something like this:

--- BEGIN ---
module Main where
import System.IO
import Network

main = withSocketsDo $ do
handle <- connectTo "localhost" ( PortNumber 8080 )
hClose handle
--- END ---

It compiles correctly, but when I try to run this code, it throws an 
exception at connectTo. The exception's message is:

- getServiceEntry: does not exists (No such service entry)

Do somebody know why this happens and how to fix it? Thanks

More information about the Haskell mailing list