qgrpcstream: add bytesToWrite() to observe the outgoing write queue
The messageWritten() signal paces writes but gives no view of how much
data the channel still holds for an RPC; an application that keeps
several messages in flight cannot bound its memory against a byte
watermark.
Add QGrpcOperationContext::bytesToWrite()/setBytesToWrite() as the
channel-side reporting pair and expose the getter on QGrpcClientStream
and QGrpcBidiStream, mirroring QIODevice::bytesToWrite().
QGrpcHttp2Channel reports the framed wire size of the accepted messages
and decrements it progressively as QHttp2Stream reports the bytes
written, so the value includes the unsent remainder of the message in
transmission and only reads 0 once everything reached the connection.
[ChangeLog][QGrpcClientStream] Added bytesToWrite() to
QGrpcClientStream and QGrpcBidiStream. It reports how many bytes the
channel has accepted for the stream but not yet written to the
transport.
Task-number: QTBUG-148066
Change-Id: I0ef59027cfc6f95353b0a85736a8c57c43a63385
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>