Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Side by Side Diff: net/quic/quic_protocol.h

Issue 2099403002: Add QuicConnectionCloseDelegateInterface. No functional change expected. Not protected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@125678921
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/quic_packet_creator.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef NET_QUIC_QUIC_PROTOCOL_H_ 5 #ifndef NET_QUIC_QUIC_PROTOCOL_H_
6 #define NET_QUIC_QUIC_PROTOCOL_H_ 6 #define NET_QUIC_QUIC_PROTOCOL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after
1345 // |retransmitted_bytes| is the number of data bytes retransmitted. 1345 // |retransmitted_bytes| is the number of data bytes retransmitted.
1346 virtual void OnPacketRetransmitted(int retransmitted_bytes) = 0; 1346 virtual void OnPacketRetransmitted(int retransmitted_bytes) = 0;
1347 1347
1348 protected: 1348 protected:
1349 friend class base::RefCounted<QuicAckListenerInterface>; 1349 friend class base::RefCounted<QuicAckListenerInterface>;
1350 1350
1351 // Delegates are ref counted. 1351 // Delegates are ref counted.
1352 virtual ~QuicAckListenerInterface() {} 1352 virtual ~QuicAckListenerInterface() {}
1353 }; 1353 };
1354 1354
1355 // Pure virtual class to close connection on unrecoverable errors.
1356 class NET_EXPORT_PRIVATE QuicConnectionCloseDelegateInterface {
1357 public:
1358 virtual ~QuicConnectionCloseDelegateInterface() {}
1359
1360 // Called when an unrecoverable error is encountered.
1361 virtual void OnUnrecoverableError(QuicErrorCode error,
1362 const std::string& error_details,
1363 ConnectionCloseSource source) = 0;
1364 };
1365
1355 struct NET_EXPORT_PRIVATE AckListenerWrapper { 1366 struct NET_EXPORT_PRIVATE AckListenerWrapper {
1356 AckListenerWrapper(QuicAckListenerInterface* listener, 1367 AckListenerWrapper(QuicAckListenerInterface* listener,
1357 QuicPacketLength data_length); 1368 QuicPacketLength data_length);
1358 AckListenerWrapper(const AckListenerWrapper& other); 1369 AckListenerWrapper(const AckListenerWrapper& other);
1359 ~AckListenerWrapper(); 1370 ~AckListenerWrapper();
1360 1371
1361 scoped_refptr<QuicAckListenerInterface> ack_listener; 1372 scoped_refptr<QuicAckListenerInterface> ack_listener;
1362 QuicPacketLength length; 1373 QuicPacketLength length;
1363 }; 1374 };
1364 1375
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1476 : iov(iov), iov_count(iov_count), total_length(total_length) {} 1487 : iov(iov), iov_count(iov_count), total_length(total_length) {}
1477 1488
1478 const struct iovec* iov; 1489 const struct iovec* iov;
1479 const int iov_count; 1490 const int iov_count;
1480 const size_t total_length; 1491 const size_t total_length;
1481 }; 1492 };
1482 1493
1483 } // namespace net 1494 } // namespace net
1484 1495
1485 #endif // NET_QUIC_QUIC_PROTOCOL_H_ 1496 #endif // NET_QUIC_QUIC_PROTOCOL_H_
OLDNEW
« no previous file with comments | « net/quic/quic_packet_creator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698