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/tools/quic/quic_server_session.h" | 5 #include "net/tools/quic/quic_server_session.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "net/quic/quic_connection.h" | 8 #include "net/quic/quic_connection.h" |
9 #include "net/quic/reliable_quic_stream.h" | 9 #include "net/quic/reliable_quic_stream.h" |
10 #include "net/tools/quic/quic_spdy_server_stream.h" | 10 #include "net/tools/quic/quic_spdy_server_stream.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 | 37 |
38 void QuicServerSession::OnConnectionClosed(QuicErrorCode error, | 38 void QuicServerSession::OnConnectionClosed(QuicErrorCode error, |
39 bool from_peer) { | 39 bool from_peer) { |
40 QuicSession::OnConnectionClosed(error, from_peer); | 40 QuicSession::OnConnectionClosed(error, from_peer); |
41 // In the unlikely event we get a connection close while doing an asynchronous | 41 // In the unlikely event we get a connection close while doing an asynchronous |
42 // crypto event, make sure we cancel the callback. | 42 // crypto event, make sure we cancel the callback. |
43 if (FLAGS_cancel_crypto_callbacks_on_close && | 43 if (FLAGS_cancel_crypto_callbacks_on_close && |
44 crypto_stream_.get() != NULL) { | 44 crypto_stream_.get() != NULL) { |
45 crypto_stream_->CancelOutstandingCallbacks(); | 45 crypto_stream_->CancelOutstandingCallbacks(); |
46 } | 46 } |
47 visitor_->OnConnectionClosed(connection()->guid(), error); | 47 visitor_->OnConnectionClosed(connection()->connection_id(), error); |
48 } | 48 } |
49 | 49 |
50 void QuicServerSession::OnWriteBlocked() { | 50 void QuicServerSession::OnWriteBlocked() { |
51 QuicSession::OnWriteBlocked(); | 51 QuicSession::OnWriteBlocked(); |
52 visitor_->OnWriteBlocked(connection()); | 52 visitor_->OnWriteBlocked(connection()); |
53 } | 53 } |
54 | 54 |
55 bool QuicServerSession::ShouldCreateIncomingDataStream(QuicStreamId id) { | 55 bool QuicServerSession::ShouldCreateIncomingDataStream(QuicStreamId id) { |
56 if (id % 2 == 0) { | 56 if (id % 2 == 0) { |
57 DVLOG(1) << "Invalid incoming even stream_id:" << id; | 57 DVLOG(1) << "Invalid incoming even stream_id:" << id; |
(...skipping 22 matching lines...) Expand all Loading... |
80 DLOG(ERROR) << "Server push not yet supported"; | 80 DLOG(ERROR) << "Server push not yet supported"; |
81 return NULL; | 81 return NULL; |
82 } | 82 } |
83 | 83 |
84 QuicCryptoServerStream* QuicServerSession::GetCryptoStream() { | 84 QuicCryptoServerStream* QuicServerSession::GetCryptoStream() { |
85 return crypto_stream_.get(); | 85 return crypto_stream_.get(); |
86 } | 86 } |
87 | 87 |
88 } // namespace tools | 88 } // namespace tools |
89 } // namespace net | 89 } // namespace net |
OLD | NEW |