I recently ran into this problem as well. I wrote a socket stream
that has a flush operation. To use it I had to do
// coded is now out of scope so it has back-up unused buffer
I had to use coded stream temporarily to write, then call Flush() on
the underlying stream AFTER it goes out of scope. It feels a bit
But then again, Flush() does not really make sense for many things,
and having its existence in the abstract interface clouds its meaning
(so you would have to say in ArrayOutputStream that Flush() does
On Oct 20, 2:37 pm, ptab <[EMAIL PROTECTED]> wrote:
> Why there is no Flush() operation on ZeroCopyOutputStream and on
> CodedOutputStream? Is there any way to persist/send over network
> whole current content of buffers ?
> I think I would be able to provide implementation of the method for
> most stream's implementations, but I think that it was a design
> What's the reason ?
> I would like to implemented some communication over network based on
> streams and flush operation is crucial to avoid blocking on both ends
> of the protocol.
> Piotr Tabor
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To post to this group, send email to firstname.lastname@example.org
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at