[Haskell-cafe] Simple binary-protocol through network test

Gregory Crosswhite gcross at phys.washington.edu
Tue Apr 6 18:01:16 EDT 2010

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


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?


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 at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list