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

Marcin 'Qrczak' Kowalczyk qrczak@knm.org.pl
28 Sep 2001 10:35:26 GMT


Thu, 27 Sep 2001 23:06:51 +0100, Jorge Adriano <jadrian@mat.uc.pt> pisze:

> Seems to me like Hsk is not 'flushing' the output.

I guess this is right (sorry, haven't checked). You can flush in
two ways (using module IO):

1. At the beginning:
       hSetBuffering stdout LineBuffering
   or even
       hSetBuffering stdout NoBuffering
   (the latter slows down the I/O).

2. After each write to be flushed:
       hFlush stdout

stdout is either line buffered or block buffered by default, depending
on whether it's a terminal or not.

-- 
 __("<  Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK