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

Side by Side Diff: net/quic/quic_crypto_stream.h

Issue 13976007: Land Recent QUIC Changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated copyright notice Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_crypto_server_stream_test.cc ('k') | net/quic/quic_crypto_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_QUIC_QUIC_CRYPTO_STREAM_H_ 5 #ifndef NET_QUIC_QUIC_CRYPTO_STREAM_H_
6 #define NET_QUIC_QUIC_CRYPTO_STREAM_H_ 6 #define NET_QUIC_QUIC_CRYPTO_STREAM_H_
7 7
8 #include "net/quic/crypto/crypto_framer.h" 8 #include "net/quic/crypto/crypto_framer.h"
9 #include "net/quic/crypto/crypto_utils.h" 9 #include "net/quic/crypto/crypto_utils.h"
10 #include "net/quic/quic_protocol.h" 10 #include "net/quic/quic_protocol.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 void SetHandshakeComplete(QuicErrorCode error); 52 void SetHandshakeComplete(QuicErrorCode error);
53 53
54 private: 54 private:
55 CryptoFramer crypto_framer_; 55 CryptoFramer crypto_framer_;
56 bool handshake_complete_; 56 bool handshake_complete_;
57 57
58 DISALLOW_COPY_AND_ASSIGN(QuicCryptoStream); 58 DISALLOW_COPY_AND_ASSIGN(QuicCryptoStream);
59 }; 59 };
60 60
61 // QuicNegotiatedParameters contains non-crypto parameters that are agreed upon
62 // during the crypto handshake.
63 class NET_EXPORT_PRIVATE QuicNegotiatedParameters {
64 public:
65 QuicNegotiatedParameters();
66
67 CryptoTag congestion_control;
68 QuicTime::Delta idle_connection_state_lifetime;
69 QuicTime::Delta keepalive_timeout;
70 };
71
72 // QuicConfig contains non-crypto configuration options that are negotiated in
73 // the crypto handshake.
74 class NET_EXPORT_PRIVATE QuicConfig {
75 public:
76 QuicConfig();
77 ~QuicConfig();
78
79 // SetDefaults sets the members to sensible, default values.
80 void SetDefaults();
81
82 // SetFromMessage extracts the non-crypto configuration from |msg| and sets
83 // the members of this object to match. This is expected to be called in the
84 // case of a server which is loading a server config. The server config
85 // contains the non-crypto parameters and so the server will need to keep its
86 // QuicConfig in sync with the server config that it'll be sending to
87 // clients.
88 bool SetFromHandshakeMessage(const CryptoHandshakeMessage& scfg);
89
90 // ToHandshakeMessage serializes the settings in this object as a series of
91 // tags /value pairs and adds them to |out|.
92 void ToHandshakeMessage(CryptoHandshakeMessage* out) const;
93
94 QuicErrorCode ProcessFinalPeerHandshake(
95 const CryptoHandshakeMessage& peer_handshake,
96 CryptoUtils::Priority priority,
97 QuicNegotiatedParameters* out_params,
98 string* error_details) const;
99
100 private:
101 // Congestion control feedback type.
102 CryptoTagVector congestion_control_;
103 // Idle connection state lifetime
104 QuicTime::Delta idle_connection_state_lifetime_;
105 // Keepalive timeout, or 0 to turn off keepalive probes
106 QuicTime::Delta keepalive_timeout_;
107 };
108
109 } // namespace net 61 } // namespace net
110 62
111 #endif // NET_QUIC_QUIC_CRYPTO_STREAM_H_ 63 #endif // NET_QUIC_QUIC_CRYPTO_STREAM_H_
OLDNEW
« no previous file with comments | « net/quic/quic_crypto_server_stream_test.cc ('k') | net/quic/quic_crypto_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698