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

Unified Diff: net/quic/quic_crypto_server_stream.h

Issue 448313003: Land Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0807
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
« no previous file with comments | « net/quic/quic_crypto_client_stream.cc ('k') | net/quic/quic_crypto_server_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_crypto_server_stream.h
diff --git a/net/quic/quic_crypto_server_stream.h b/net/quic/quic_crypto_server_stream.h
index ee4013120e4f82d65558465c79b91c2c7a03d71a..9cb242bea802bd7c01753c3fb8e21502eba2a3d4 100644
--- a/net/quic/quic_crypto_server_stream.h
+++ b/net/quic/quic_crypto_server_stream.h
@@ -16,12 +16,37 @@ namespace net {
class CryptoHandshakeMessage;
class QuicCryptoServerConfig;
+class QuicCryptoServerStream;
class QuicSession;
namespace test {
class CryptoTestUtils;
} // namespace test
+// Receives a notification when the server hello (SHLO) has been ACKed by the
+// peer. At this point we disable HANDSHAKE_MODE in the sent packet manager.
+class NET_EXPORT_PRIVATE ServerHelloNotifier : public
+ QuicAckNotifier::DelegateInterface {
+ public:
+ explicit ServerHelloNotifier(QuicCryptoServerStream* stream)
+ : server_stream_(stream) {}
+
+ // QuicAckNotifier::DelegateInterface implementation
+ virtual void OnAckNotification(
+ int num_original_packets,
+ int num_original_bytes,
+ int num_retransmitted_packets,
+ int num_retransmitted_bytes,
+ QuicTime::Delta delta_largest_observed) OVERRIDE;
+
+ private:
+ virtual ~ServerHelloNotifier() {}
+
+ QuicCryptoServerStream* server_stream_;
+
+ DISALLOW_COPY_AND_ASSIGN(ServerHelloNotifier);
+};
+
class NET_EXPORT_PRIVATE QuicCryptoServerStream : public QuicCryptoStream {
public:
QuicCryptoServerStream(const QuicCryptoServerConfig& crypto_config,
@@ -44,6 +69,17 @@ class NET_EXPORT_PRIVATE QuicCryptoServerStream : public QuicCryptoStream {
uint8 num_handshake_messages() const { return num_handshake_messages_; }
+ int num_server_config_update_messages_sent() const {
+ return num_server_config_update_messages_sent_;
+ }
+
+ // Sends the latest server config and source-address token to the client.
+ void SendServerConfigUpdate();
+
+ // Called by the ServerHello AckNotifier once the SHLO has been ACKed by the
+ // client.
+ void OnServerHelloAcked();
+
protected:
virtual QuicErrorCode ProcessClientHello(
const CryptoHandshakeMessage& message,
@@ -90,8 +126,12 @@ class NET_EXPORT_PRIVATE QuicCryptoServerStream : public QuicCryptoStream {
// handshake message is being validated.
ValidateCallback* validate_client_hello_cb_;
+ // Number of handshake messages received by this stream.
uint8 num_handshake_messages_;
+ // Number of server config update (SCUP) messages sent by this stream.
+ int num_server_config_update_messages_sent_;
+
DISALLOW_COPY_AND_ASSIGN(QuicCryptoServerStream);
};
« no previous file with comments | « net/quic/quic_crypto_client_stream.cc ('k') | net/quic/quic_crypto_server_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698