| 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 #include "net/quic/quic_crypto_stream.h" | 5 #include "net/quic/quic_crypto_stream.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/strings/string_piece.h" | 9 #include "base/strings/string_piece.h" |
| 10 #include "net/quic/crypto/crypto_handshake.h" | 10 #include "net/quic/crypto/crypto_handshake.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 void QuicCryptoStream::CloseConnectionWithDetails(QuicErrorCode error, | 53 void QuicCryptoStream::CloseConnectionWithDetails(QuicErrorCode error, |
| 54 const string& details) { | 54 const string& details) { |
| 55 session()->connection()->SendConnectionCloseWithDetails(error, details); | 55 session()->connection()->SendConnectionCloseWithDetails(error, details); |
| 56 } | 56 } |
| 57 | 57 |
| 58 void QuicCryptoStream::SendHandshakeMessage( | 58 void QuicCryptoStream::SendHandshakeMessage( |
| 59 const CryptoHandshakeMessage& message) { | 59 const CryptoHandshakeMessage& message) { |
| 60 session()->OnCryptoHandshakeMessageSent(message); | 60 session()->OnCryptoHandshakeMessageSent(message); |
| 61 const QuicData& data = message.GetSerialized(); | 61 const QuicData& data = message.GetSerialized(); |
| 62 // To make reasoning about crypto frames easier, we don't combine them with |
| 63 // any other frames in a single packet. |
| 64 session()->connection()->Flush(); |
| 62 // TODO(wtc): check the return value. | 65 // TODO(wtc): check the return value. |
| 63 WriteData(string(data.data(), data.length()), false); | 66 WriteData(string(data.data(), data.length()), false); |
| 67 session()->connection()->Flush(); |
| 64 } | 68 } |
| 65 | 69 |
| 66 const QuicCryptoNegotiatedParameters& | 70 const QuicCryptoNegotiatedParameters& |
| 67 QuicCryptoStream::crypto_negotiated_params() const { | 71 QuicCryptoStream::crypto_negotiated_params() const { |
| 68 return crypto_negotiated_params_; | 72 return crypto_negotiated_params_; |
| 69 } | 73 } |
| 70 | 74 |
| 71 } // namespace net | 75 } // namespace net |
| OLD | NEW |