logo       

Re: Network Exception: msg#00036

lang.haskell.glasgow.bugs

Subject: Re: Network Exception

Just to be clear -- this is with ghc-6.4.1 as distributed
via the GHC web pages and not some local build..?

I can't explain this -- the example code you give will have
successfully started up WinSock (version 1.1) prior to
calling getHostName, so that error condition doesn't
make much sense.

Given the two networking issues you've already come
across, I wouldn't discount the option that this might
be due to a local problem with your networking setup
(WinSock proxy config..?)

--sigbjorn

----- Original Message ----- From: "Arias" <arias@xxxxxxxxxxxxxxx>
To: "Sigbjorn Finne" <sof@xxxxxxxxxx>
Cc: <glasgow-haskell-bugs@xxxxxxxxxxx>
Sent: Friday, October 14, 2005 14:01
Subject: Re: Network Exception


Thanks for the reply.

I don't know if the problem is the same, but when I try to run this code:

main = withSocketsDo $ do
host <- getHostName
putStrLn host

the getHostName throws this exception:

getHostName: failed (Successful WSAStartup not yet performed (WSANOTINITIALISED))

:( I'm using Windows XP Professional

Sigbjorn Finne escribió:

Hi,

that error message is a bit confusing, to say the least:
getProtocolByName identifies itself as getServiceEntry
when failing. In this case, I'm quite sure, your snippet
fails because (getProtocolByName "tcp") isn't successful.
I've no idea why your /etc/protocols doesn't contain an entry
for 'tcp'.

The error message in said function has now been fixed; thanks
for the report.

--sigbjorn

----- Original Message ----- From: "Arias" <arias@xxxxxxxxxxxxxxx>
To: <glasgow-haskell-users@xxxxxxxxxxx>
Sent: Friday, October 14, 2005 06:47
Subject: Network Exception


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.
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users







<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise