Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1283)

Unified Diff: net/quic/reliable_quic_stream.cc

Issue 11364068: Add a QuicHttpStream class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: NET_EXPORT_PRIVATE Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/reliable_quic_stream.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/reliable_quic_stream.cc
diff --git a/net/quic/reliable_quic_stream.cc b/net/quic/reliable_quic_stream.cc
index d3e7cf81c4dc3887f105bdad05b1be726fb63d0d..1ad557bcc826e1798931d0c20b58e59d633db3bb 100644
--- a/net/quic/reliable_quic_stream.cc
+++ b/net/quic/reliable_quic_stream.cc
@@ -90,18 +90,22 @@ bool ReliableQuicStream::HasBytesToRead() const {
return sequencer_.HasBytesToRead();
}
+const IPEndPoint& ReliableQuicStream::GetPeerAddress() const {
+ return session_->peer_address();
+}
+
int ReliableQuicStream::WriteData(StringPiece data, bool fin) {
if (write_side_closed_) {
DLOG(ERROR) << "Attempt to write when the write side is closed";
return 0;
}
- session()->WriteData(id(), data, offset_, fin);
+ int rv = session()->WriteData(id(), data, offset_, fin);
offset_ += data.length();
if (fin) {
CloseWriteSide();
}
- return data.length();
+ return rv;
}
void ReliableQuicStream::CloseReadSide() {
@@ -112,6 +116,7 @@ void ReliableQuicStream::CloseReadSide() {
read_side_closed_ = true;
if (write_side_closed_) {
+ DLOG(INFO) << "Closing stream: " << id();
session_->CloseStream(id());
}
}
@@ -124,6 +129,7 @@ void ReliableQuicStream::CloseWriteSide() {
write_side_closed_ = true;
if (read_side_closed_) {
+ DLOG(INFO) << "Closing stream: " << id();
session_->CloseStream(id());
}
}
« no previous file with comments | « net/quic/reliable_quic_stream.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698