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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 } | 48 } |
49 | 49 |
50 void QuicCryptoStream::SendHandshakeMessage( | 50 void QuicCryptoStream::SendHandshakeMessage( |
51 const CryptoHandshakeMessage& message) { | 51 const CryptoHandshakeMessage& message) { |
52 session()->OnCryptoHandshakeMessageSent(message); | 52 session()->OnCryptoHandshakeMessageSent(message); |
53 const QuicData& data = message.GetSerialized(); | 53 const QuicData& data = message.GetSerialized(); |
54 // To make reasoning about crypto frames easier, we don't combine them with | 54 // To make reasoning about crypto frames easier, we don't combine them with |
55 // any other frames in a single packet. | 55 // any other frames in a single packet. |
56 session()->connection()->Flush(); | 56 session()->connection()->Flush(); |
57 // TODO(wtc): check the return value. | 57 // TODO(wtc): check the return value. |
58 WriteData(string(data.data(), data.length()), false); | 58 WriteOrBufferData(string(data.data(), data.length()), false); |
59 session()->connection()->Flush(); | 59 session()->connection()->Flush(); |
60 } | 60 } |
61 | 61 |
62 const QuicCryptoNegotiatedParameters& | 62 const QuicCryptoNegotiatedParameters& |
63 QuicCryptoStream::crypto_negotiated_params() const { | 63 QuicCryptoStream::crypto_negotiated_params() const { |
64 return crypto_negotiated_params_; | 64 return crypto_negotiated_params_; |
65 } | 65 } |
66 | 66 |
67 } // namespace net | 67 } // namespace net |
OLD | NEW |