| 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 // The entity that handles framing writes for a Quic client or server. | 5 // The entity that handles framing writes for a Quic client or server. |
| 6 // Each QuicSession will have a connection associated with it. | 6 // Each QuicSession will have a connection associated with it. |
| 7 // | 7 // |
| 8 // On the server side, the Dispatcher handles the raw reads, and hands off | 8 // On the server side, the Dispatcher handles the raw reads, and hands off |
| 9 // packets via ProcessUdpPacket for framing and processing. | 9 // packets via ProcessUdpPacket for framing and processing. |
| 10 // | 10 // |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 void OnHandshakeComplete(); | 476 void OnHandshakeComplete(); |
| 477 | 477 |
| 478 // Accessors | 478 // Accessors |
| 479 void set_visitor(QuicConnectionVisitorInterface* visitor) { | 479 void set_visitor(QuicConnectionVisitorInterface* visitor) { |
| 480 visitor_ = visitor; | 480 visitor_ = visitor; |
| 481 } | 481 } |
| 482 void set_debug_visitor(QuicConnectionDebugVisitor* debug_visitor) { | 482 void set_debug_visitor(QuicConnectionDebugVisitor* debug_visitor) { |
| 483 debug_visitor_ = debug_visitor; | 483 debug_visitor_ = debug_visitor; |
| 484 sent_packet_manager_->SetDebugDelegate(debug_visitor); | 484 sent_packet_manager_->SetDebugDelegate(debug_visitor); |
| 485 } | 485 } |
| 486 // Used in Chromium, but not internally. |
| 487 // Must only be called before ping_alarm_ is set. |
| 486 void set_ping_timeout(QuicTime::Delta ping_timeout) { | 488 void set_ping_timeout(QuicTime::Delta ping_timeout) { |
| 489 DCHECK(!ping_alarm_->IsSet()); |
| 487 ping_timeout_ = ping_timeout; | 490 ping_timeout_ = ping_timeout; |
| 488 } | 491 } |
| 489 const QuicTime::Delta ping_timeout() { return ping_timeout_; } | 492 const QuicTime::Delta ping_timeout() { return ping_timeout_; } |
| 490 // Used in Chromium, but not internally. | |
| 491 void set_creator_debug_delegate(QuicPacketCreator::DebugDelegate* visitor) { | 493 void set_creator_debug_delegate(QuicPacketCreator::DebugDelegate* visitor) { |
| 492 packet_generator_.set_debug_delegate(visitor); | 494 packet_generator_.set_debug_delegate(visitor); |
| 493 } | 495 } |
| 494 const IPEndPoint& self_address() const { return self_address_; } | 496 const IPEndPoint& self_address() const { return self_address_; } |
| 495 const IPEndPoint& peer_address() const { return peer_address_; } | 497 const IPEndPoint& peer_address() const { return peer_address_; } |
| 496 QuicConnectionId connection_id() const { return connection_id_; } | 498 QuicConnectionId connection_id() const { return connection_id_; } |
| 497 const QuicClock* clock() const { return clock_; } | 499 const QuicClock* clock() const { return clock_; } |
| 498 QuicRandom* random_generator() const { return random_generator_; } | 500 QuicRandom* random_generator() const { return random_generator_; } |
| 499 QuicByteCount max_packet_length() const; | 501 QuicByteCount max_packet_length() const; |
| 500 void SetMaxPacketLength(QuicByteCount length); | 502 void SetMaxPacketLength(QuicByteCount length); |
| (...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1105 // Indicates whether a write error is encountered currently. This is used to | 1107 // Indicates whether a write error is encountered currently. This is used to |
| 1106 // avoid infinite write errors. | 1108 // avoid infinite write errors. |
| 1107 bool write_error_occured_; | 1109 bool write_error_occured_; |
| 1108 | 1110 |
| 1109 DISALLOW_COPY_AND_ASSIGN(QuicConnection); | 1111 DISALLOW_COPY_AND_ASSIGN(QuicConnection); |
| 1110 }; | 1112 }; |
| 1111 | 1113 |
| 1112 } // namespace net | 1114 } // namespace net |
| 1113 | 1115 |
| 1114 #endif // NET_QUIC_QUIC_CONNECTION_H_ | 1116 #endif // NET_QUIC_QUIC_CONNECTION_H_ |
| OLD | NEW |