Hmm, I am guessing it is more likely that the problem is that the I/O system changed from 6.10.4 to 6.12.1 somehow in a way that broke the package. You could try turning off all buffering in the handle using hSetBuffering and seeing if that works.
Cheers, Greg On Apr 6, 2010, at 3:44 PM, Yves Parès wrote: > > Weird... > > I use GHC 6.12.1, and I run Ubuntu 9.10 (32bits version). > > Would have I miss something? Like a flush or a close? Logically, I don't see > where I would... > > > Gregory Crosswhite-2 wrote: >> >> Yay, I'm glad to see someone else using my package. :-) >> >> Hmm, your program seems to work for me. I compiled and ran the Server >> (with ghc --make), then compiled and ran the Client, and then typed >> >> Operation 1.0 Mult 2.0 >> >> into the Client process, and the result it got was >> >> 2.0 >> >> with the output >> >> Just 2.0 >> >> on the Server. >> >> I got the same results running this on Mac OSX and (Gentoo) Linux, with >> GHC 10.4. What platform/GHC version are you running it on? >> >> Cheers, >> Greg >> >> On Apr 6, 2010, at 2:38 PM, Yves Parès wrote: >> >>> >>> Hello, >>> >>> I'm trying to use the packages Network and Control.Monad.BinaryProtocol >>> together, with a very simple program in which a client sends an operation >>> to >>> the server, which computes the result and sends it back. >>> >>> But the server holds when trying to receive (Server.hs, line 22), whereas >>> the client has actually sent the data (Client.hs, line 17). >>> The server stops to hold only when the client is killed with a Ctrl-C. >>> >>> This should be rather simple, and I can't get to know why it doesn't >>> work. >>> >>> The files are here: >>> http://old.nabble.com/file/p28157883/Client.hs Client.hs >>> http://old.nabble.com/file/p28157883/Server.hs Server.hs >>> http://old.nabble.com/file/p28157883/SharedData.hs SharedData.hs >>> >>> ----- >>> Yves Parès >>> >>> Live long and prosper >>> -- >>> View this message in context: >>> http://old.nabble.com/Simple-binary-protocol-through-network-test-tp28157883p28157883.html >>> Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. >>> >>> _______________________________________________ >>> Haskell-Cafe mailing list >>> Haskell-Cafe@haskell.org >>> http://www.haskell.org/mailman/listinfo/haskell-cafe >> >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe@haskell.org >> http://www.haskell.org/mailman/listinfo/haskell-cafe >> >> > > > ----- > Yves Parès > > Live long and prosper > -- > View this message in context: > http://old.nabble.com/Simple-binary-protocol-through-network-test-tp28157883p28158514.html > Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe