<p>Hi Arnaud,</p>
<p>One thing you might want to try is to stop using the PortNumber data constructor, and instead rely on 'fromInteger' to do the right thing.</p>
<p>The data constructor assumes that it's argument is in network byte order, which won't always be the case.</p>
<p>It's not obvious that the constructor should be avoided - this is the second time today I've seen this!</p>
<p>Take care,<br>
Antoine</p>
<p><blockquote type="cite">On Jun 3, 2010 5:13 PM, "Arnaud Bailly" <<a href="mailto:arnaud.oqube@gmail.com">arnaud.oqube@gmail.com</a>> wrote:<br><br>Hello,<br>
I have the following code which works ok on Linux and Windows XP, but<br>
fails on Mac OS X with error message:<br>
<br>
Connect: does not exist (connection refused)<br>
<br>
The server:<br>
<br>
doStartstate = do pr <- liftIO $ runProcess ...<br>
liftIO $ threadDelay 500000<br>
st <- get<br>
put st { slimHandle = Just pr }<br>
<br>
<br>
The client:<br>
<br>
fetchAnswers st msgs = liftIO $! do let port = PortNumber $<br>
fromInteger $ port $ config st<br>
cnx <- connectTo "localhost" port<br>
<br>
Help most welcome, thanks<br>
<br>
Arnaud<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</blockquote></p>