| OLD | NEW |
| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 // Crypto handshake messages in QUIC take place over a reserved | 23 // Crypto handshake messages in QUIC take place over a reserved |
| 24 // reliable stream with the id 1. Each endpoint (client and server) | 24 // reliable stream with the id 1. Each endpoint (client and server) |
| 25 // will allocate an instance of a subclass of QuicCryptoStream | 25 // will allocate an instance of a subclass of QuicCryptoStream |
| 26 // to send and receive handshake messages. (In the normal 1-RTT | 26 // to send and receive handshake messages. (In the normal 1-RTT |
| 27 // handshake, the client will send a client hello, CHLO, message. | 27 // handshake, the client will send a client hello, CHLO, message. |
| 28 // The server will receive this message and respond with a server | 28 // The server will receive this message and respond with a server |
| 29 // hello message, SHLO. At this point both sides will have established | 29 // hello message, SHLO. At this point both sides will have established |
| 30 // a crypto context they can use to send encrypted messages. | 30 // a crypto context they can use to send encrypted messages. |
| 31 // | 31 // |
| 32 // For more details: http://goto.google.com/quic-crypto | 32 // For more details: |
| 33 // https://docs.google.com/document/d/1g5nIXAIkN_Y-7XJW5K45IblHd_L2f5LTaDUDwvZ5L
6g/edit?usp=sharing |
| 33 class NET_EXPORT_PRIVATE QuicCryptoStream | 34 class NET_EXPORT_PRIVATE QuicCryptoStream |
| 34 : public ReliableQuicStream, | 35 : public ReliableQuicStream, |
| 35 public CryptoFramerVisitorInterface { | 36 public CryptoFramerVisitorInterface { |
| 36 public: | 37 public: |
| 37 explicit QuicCryptoStream(QuicSession* session); | 38 explicit QuicCryptoStream(QuicSession* session); |
| 38 | 39 |
| 39 ~QuicCryptoStream() override; | 40 ~QuicCryptoStream() override; |
| 40 | 41 |
| 41 // Returns the per-packet framing overhead associated with sending a | 42 // Returns the per-packet framing overhead associated with sending a |
| 42 // handshake message for |version|. | 43 // handshake message for |version|. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 | 86 |
| 86 private: | 87 private: |
| 87 CryptoFramer crypto_framer_; | 88 CryptoFramer crypto_framer_; |
| 88 | 89 |
| 89 DISALLOW_COPY_AND_ASSIGN(QuicCryptoStream); | 90 DISALLOW_COPY_AND_ASSIGN(QuicCryptoStream); |
| 90 }; | 91 }; |
| 91 | 92 |
| 92 } // namespace net | 93 } // namespace net |
| 93 | 94 |
| 94 #endif // NET_QUIC_QUIC_CRYPTO_STREAM_H_ | 95 #endif // NET_QUIC_QUIC_CRYPTO_STREAM_H_ |
| OLD | NEW |