how to get boost::iostreams non-buffered ?

Hi, I'm trying to get boost::iostream::stream to work in non buffered mode, because atm I have something like : std::streamsize read(char* s, std::streamsize n) { DWORD total; if(!ReadFile(m_handle.get(), s, 1, &total, 0)) throw device_error(GetLastError()); return total; } And this works, but my 1st try was to use "n" instead of "1", but then it blocked because n is 4096, even when I do a simple .get() on my stream. I saw there was a : stream( const T& t, std::streamsize buffer_size, std::streamsize pback_size ); constructor, and I tried to use it like, stream s(mystreambuf, 0, 0); but it kept asking for 4096 bytes. The boost::iostream buffered/non-buffered part of the documentation simply says : 3.11 Buffering [To be supplied in the next release] So it looks like I'm stuck :) Thank you for your help. Philippe
participants (1)
-
Philippe Vaucher