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

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

Issue 1327923002: Migrates QUIC sessions to a new network when old network is (about to be) disconnected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@home
Patch Set: Naming fixes. Created 5 years 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
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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 5
6 #ifndef NET_QUIC_QUIC_PACKET_READER_H_ 6 #ifndef NET_QUIC_QUIC_PACKET_READER_H_
7 #define NET_QUIC_QUIC_PACKET_READER_H_ 7 #define NET_QUIC_QUIC_PACKET_READER_H_
8 8
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "net/base/io_buffer.h" 10 #include "net/base/io_buffer.h"
(...skipping 11 matching lines...) Expand all
22 // milliseconds have passed, QuicPacketReader::StartReading() yields by doing a 22 // milliseconds have passed, QuicPacketReader::StartReading() yields by doing a
23 // QuicPacketReader::PostTask(). 23 // QuicPacketReader::PostTask().
24 const int kQuicYieldAfterPacketsRead = 32; 24 const int kQuicYieldAfterPacketsRead = 32;
25 const int kQuicYieldAfterDurationMilliseconds = 20; 25 const int kQuicYieldAfterDurationMilliseconds = 20;
26 26
27 class NET_EXPORT_PRIVATE QuicPacketReader { 27 class NET_EXPORT_PRIVATE QuicPacketReader {
28 public: 28 public:
29 class NET_EXPORT_PRIVATE Visitor { 29 class NET_EXPORT_PRIVATE Visitor {
30 public: 30 public:
31 virtual ~Visitor() {}; 31 virtual ~Visitor() {};
32 virtual void OnReadError(int result) = 0; 32 virtual void OnReadError(int result,
33 const DatagramClientSocket* socket) = 0;
Ryan Hamilton 2015/12/18 21:51:23 I'd probably break this out, since it should be ea
Jana 2015/12/21 23:10:19 Acknowledged.
33 virtual bool OnPacket(const QuicEncryptedPacket& packet, 34 virtual bool OnPacket(const QuicEncryptedPacket& packet,
34 IPEndPoint local_address, 35 IPEndPoint local_address,
35 IPEndPoint peer_address) = 0; 36 IPEndPoint peer_address) = 0;
36 }; 37 };
37 38
38 QuicPacketReader(DatagramClientSocket* socket, 39 QuicPacketReader(DatagramClientSocket* socket,
39 QuicClock* clock, 40 QuicClock* clock,
40 Visitor* visitor, 41 Visitor* visitor,
41 int yield_after_packets, 42 int yield_after_packets,
42 QuicTime::Delta yield_after_duration, 43 QuicTime::Delta yield_after_duration,
(...skipping 20 matching lines...) Expand all
63 BoundNetLog net_log_; 64 BoundNetLog net_log_;
64 65
65 base::WeakPtrFactory<QuicPacketReader> weak_factory_; 66 base::WeakPtrFactory<QuicPacketReader> weak_factory_;
66 67
67 DISALLOW_COPY_AND_ASSIGN(QuicPacketReader); 68 DISALLOW_COPY_AND_ASSIGN(QuicPacketReader);
68 }; 69 };
69 70
70 } // namespace net 71 } // namespace net
71 72
72 #endif // NET_QUIC_QUIC_PACKET_READER_H_ 73 #endif // NET_QUIC_QUIC_PACKET_READER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698