src,stream: improve DoWrite() and Write()
StreamBase::Write()
calls StreamResource::DoTryWrite()
and StreamResource::DoWrite()
to do the job.
However the interface definition of StreamResource::DoWrite()
is error-prone or at least confusing, which I guess leads to an wrong(but no effect fortunately) override, Http2Stream::DoWrite()
. This PR takes care of these two issues and make the StreamBase::WriteString()
more efficent in the case where the underlying stream is too busy to receive more data.