RE: Haskell <-> C/C++ comunication (sockets/pipes?)

28 Sep
2001
28 Sep
'01
7:16 a.m.
Can you tell me what is the problem here? Haskell app output is redirected to C++ input app (and vice-versa) using pipes. (used Erays shell script sugestion)
When I try 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 terminal. Cheers, Simon
8635
Age (days ago)
8635
Last active (days ago)
0 comments
1 participants
participants (1)
-
Simon Marlow