Haskell <-> C/C++ comunication (sockets/pipes?)
Fri, 28 Sep 2001 12:16:51 +0100
> Can you tell me what is the problem here?
> Haskell app output is redirected to C++ input app (and=20
> vice-versa) using=20
> pipes. (used Erays shell script sugestion)
> When I try=20
> Hsk: 1. get, 2.send
> C++: 1. send, 2 get
> It works fine, but if I try it the other way around it locks.
> C++ app won't get any input.
> Seems to me like Hsk is not 'flushing' the output.
You may need to set the buffering mode on the handle to LineBuffering,
using IO.hSetBuffering. In GHC at least, the buffering mode is set to
line buffering by default if and only if the handle is connected to a