Boost logo

Boost Users :

From: Eric MALENFANT (Eric.Malenfant_at_[hidden])
Date: 2008-01-23 09:36:04


boost-users-bounces_at_[hidden], le 23 janvier 2008 07:07:
> Hi all,
>
> I've created my own iostreams device (for a serial port) which for
> debugging purposes prints out calls to read()/write().
>
> I'm constructing a stream on the device like this:
> serial_device serial("/dev/ttyS3", serial_device::Baud38400);
> stream<serial_device> s(serial);
>
> If I do this:
> s << "hello world" << endl;
> serial.write() is called and does its debug output, but with this:
> s << "hello world\r" << flush;
> I get nothing despite using 'flush'.
>
> I've also tried calling s.flush() manually but get the same
> lack of effect.
> How come flush isn't working as it should here?

A wild guess: Does serial_device implement the "Flushable" concept?
http://www.boost.org/libs/iostreams/doc/index.html?path=4.1.3.2

Éric Malenfant
---------------------------------------------


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net