summaryrefslogtreecommitdiffstats
path: root/net/quic/quic_session.cc
diff options
context:
space:
mode:
authorrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-11 08:49:07 +0000
committerrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-11 08:49:07 +0000
commitcff7b7b50c63dc3b03cc49e6c0ba999d5e51da4a (patch)
tree817949bdc92f9d7cc758c0abe1de78dd7aecbe9e /net/quic/quic_session.cc
parent3bae1d223e934227c005e2923413ca6499c4e481 (diff)
downloadchromium_src-cff7b7b50c63dc3b03cc49e6c0ba999d5e51da4a.zip
chromium_src-cff7b7b50c63dc3b03cc49e6c0ba999d5e51da4a.tar.gz
chromium_src-cff7b7b50c63dc3b03cc49e6c0ba999d5e51da4a.tar.bz2
Handling partial writes and fin-only writes in QUIC.
This handles an API problem for sending a fin with no associated data. This can happen at the GFE if we're dechunking HTTP, have sent all bytes read from a backend, and then we get a 0 byte terminal chunk. In this case, we have no way of telling when we write data if the fin was consumed, or if the write was blocked at an underlying layer and the end of data would otherwise never be communicated to the peer. Merge internal change: 40340063 Review URL: https://chromiumcodereview.appspot.com/11820003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176287 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/quic/quic_session.cc')
-rw-r--r--net/quic/quic_session.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/quic/quic_session.cc b/net/quic/quic_session.cc
index 02d2a6c..49490f6 100644
--- a/net/quic/quic_session.cc
+++ b/net/quic/quic_session.cc
@@ -145,8 +145,10 @@ bool QuicSession::OnCanWrite() {
return write_blocked_streams_.empty();
}
-int QuicSession::WriteData(QuicStreamId id, StringPiece data,
- QuicStreamOffset offset, bool fin) {
+QuicConsumedData QuicSession::WriteData(QuicStreamId id,
+ StringPiece data,
+ QuicStreamOffset offset,
+ bool fin) {
// TODO(wtc): type mismatch -- connection_->SendStreamData() returns a
// size_t.
return connection_->SendStreamData(id, data, offset, fin, NULL);