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

Unified Diff: net/quic/quic_config.cc

Issue 446283002: Include the socket receive buffer in the connection handshake. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@improve_SendAlgorithmSimulator_72332690
Patch Set: Created 6 years, 4 months 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
Index: net/quic/quic_config.cc
diff --git a/net/quic/quic_config.cc b/net/quic/quic_config.cc
index 90579d3a03f3bdcb8ffe169516943823ab8650f1..c68eac980be60f6d28635f3356fbe44d7a830613 100644
--- a/net/quic/quic_config.cc
+++ b/net/quic/quic_config.cc
@@ -443,7 +443,8 @@ QuicConfig::QuicConfig()
initial_stream_flow_control_window_bytes_(kSFCW, PRESENCE_OPTIONAL),
// TODO(rjshade): Make this PRESENCE_REQUIRED when retiring
// QUIC_VERSION_19.
- initial_session_flow_control_window_bytes_(kCFCW, PRESENCE_OPTIONAL) {
+ initial_session_flow_control_window_bytes_(kCFCW, PRESENCE_OPTIONAL),
+ socket_receive_buffer_(kSRBF, PRESENCE_OPTIONAL) {
}
QuicConfig::~QuicConfig() {}
@@ -617,6 +618,22 @@ uint32 QuicConfig::ReceivedInitialSessionFlowControlWindowBytes() const {
return initial_session_flow_control_window_bytes_.GetReceivedValue();
}
+void QuicConfig::SetSocketReceiveBufferToSend(uint32 tcp_receive_window) {
+ socket_receive_buffer_.SetSendValue(tcp_receive_window);
+}
+
+uint32 QuicConfig::GetSocketReceiveBufferToSend() const {
+ return socket_receive_buffer_.GetSendValue();
+}
+
+bool QuicConfig::HasReceivedSocketReceiveBuffer() const {
+ return socket_receive_buffer_.HasReceivedValue();
+}
+
+uint32 QuicConfig::ReceivedSocketReceiveBuffer() const {
+ return socket_receive_buffer_.GetReceivedValue();
+}
+
bool QuicConfig::negotiated() {
// TODO(ianswett): Add the negotiated parameters once and iterate over all
// of them in negotiated, ToHandshakeMessage, ProcessClientHello, and
@@ -668,6 +685,7 @@ void QuicConfig::ToHandshakeMessage(CryptoHandshakeMessage* out) const {
initial_flow_control_window_bytes_.ToHandshakeMessage(out);
initial_stream_flow_control_window_bytes_.ToHandshakeMessage(out);
initial_session_flow_control_window_bytes_.ToHandshakeMessage(out);
+ socket_receive_buffer_.ToHandshakeMessage(out);
connection_options_.ToHandshakeMessage(out);
}
@@ -715,6 +733,10 @@ QuicErrorCode QuicConfig::ProcessPeerHello(
peer_hello, hello_type, error_details);
}
if (error == QUIC_NO_ERROR) {
+ error = socket_receive_buffer_.ProcessPeerHello(
+ peer_hello, hello_type, error_details);
+ }
+ if (error == QUIC_NO_ERROR) {
error = loss_detection_.ProcessPeerHello(
peer_hello, hello_type, error_details);
}
« no previous file with comments | « net/quic/quic_config.h ('k') | net/quic/quic_config_test.cc » ('j') | net/quic/quic_protocol.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698