Hello,
Maybe this is a bug?
I've been experimenting with the Socket library supplied
with ghc version 4.08.1. I'm using "awajicho", a SPARC
station running Solaris 2.7. Now when I compile these two
modules:
module Main where ---------- module X -----------
import Socket
import Posix
main :: IO ()
main =
do { sendTo "awajicho" (PortNumber (mkPortNumber 5000)) "abcd1234"
; s <- recvFrom "awajicho" (PortNumber (mkPortNumber 5001))
; putStrLn s
}
module Main where ----------- module Y ----------------
import Socket
import Posix
main :: IO ()
main =
do { s <- recvFrom "awajicho" (PortNumber (mkPortNumber 5000))
; sendTo "awajicho" (PortNumber (mkPortNumber 5001)) s
}
like this:
$ ghc X.hs -o x -syslib posix -syslib net
$ ghc Y.hs -o y -syslib posix -syslib net
and run the code:
$ ./y &
12935
$ x
1234abcd
$ ./y &
12938
$ x
1234bacd
All of which is (to me at least) rather strange. I would expect abcd1234.
Any idea what I'm doing wrong?
Responses to [EMAIL PROTECTED] and the list please,
Thanks
David
-------------------------------------------------------------------------------
Dr. David Wakeling, School of Engineering and Computer Science
University of Exeter, Exeter, Devon, EX4 4PT.
unofficial web page: http://www.dcs.ex.ac.uk/~david
-------------------------------------------------------------------------------
_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs