summaryrefslogtreecommitdiffstats
path: root/net/quic/quic_crypto_stream.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/quic/quic_crypto_stream.cc')
-rw-r--r--net/quic/quic_crypto_stream.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/quic/quic_crypto_stream.cc b/net/quic/quic_crypto_stream.cc
index d53b736..25467cb 100644
--- a/net/quic/quic_crypto_stream.cc
+++ b/net/quic/quic_crypto_stream.cc
@@ -18,10 +18,13 @@ using base::StringPiece;
namespace net {
+#define ENDPOINT (is_server_ ? "Server: " : " Client: ")
+
QuicCryptoStream::QuicCryptoStream(QuicSession* session)
: ReliableQuicStream(kCryptoStreamId, session),
encryption_established_(false),
- handshake_confirmed_(false) {
+ handshake_confirmed_(false),
+ is_server_(session->is_server()) {
crypto_framer_.set_visitor(this);
if (version() <= QUIC_VERSION_20) {
// Prior to QUIC_VERSION_21 the crypto stream is not subject to any flow
@@ -39,6 +42,7 @@ void QuicCryptoStream::OnError(CryptoFramer* framer) {
void QuicCryptoStream::OnHandshakeMessage(
const CryptoHandshakeMessage& message) {
+ DVLOG(1) << ENDPOINT << "Received " << message.DebugString();
session()->OnCryptoHandshakeMessageReceived(message);
}
@@ -57,6 +61,7 @@ QuicPriority QuicCryptoStream::EffectivePriority() const {
void QuicCryptoStream::SendHandshakeMessage(
const CryptoHandshakeMessage& message) {
+ DVLOG(1) << ENDPOINT << "Sending " << message.DebugString();
session()->OnCryptoHandshakeMessageSent(message);
const QuicData& data = message.GetSerialized();
// TODO(wtc): check the return value.