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

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

Issue 1404873003: relnote: Avoid redundant recvmmsg when the previous recvmmsg returned (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@QUIC_test_tools_104305494
Patch Set: Created 5 years, 2 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_flags.cc ('k') | net/tools/quic/quic_packet_reader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 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 // A class to read incoming QUIC packets from the UDP socket. 5 // A class to read incoming QUIC packets from the UDP socket.
6 6
7 #ifndef NET_TOOLS_QUIC_QUIC_PACKET_READER_H_ 7 #ifndef NET_TOOLS_QUIC_QUIC_PACKET_READER_H_
8 #define NET_TOOLS_QUIC_QUIC_PACKET_READER_H_ 8 #define NET_TOOLS_QUIC_QUIC_PACKET_READER_H_
9 9
10 #include <netinet/in.h> 10 #include <netinet/in.h>
(...skipping 19 matching lines...) Expand all
30 class ProcessPacketInterface; 30 class ProcessPacketInterface;
31 class QuicDispatcher; 31 class QuicDispatcher;
32 32
33 class QuicPacketReader { 33 class QuicPacketReader {
34 public: 34 public:
35 QuicPacketReader(); 35 QuicPacketReader();
36 36
37 virtual ~QuicPacketReader(); 37 virtual ~QuicPacketReader();
38 38
39 // Reads a number of packets from the given fd, and then passes them off to 39 // Reads a number of packets from the given fd, and then passes them off to
40 // the PacketProcessInterface. Returns true if at least 1 packet is read, 40 // the PacketProcessInterface. Returns true if there may be additional
41 // false otherwise. 41 // packets available on the socket.
42 // Populates |packets_dropped| if it is non-null and the socket is configured 42 // Populates |packets_dropped| if it is non-null and the socket is configured
43 // to track dropped packets and some packets are read. 43 // to track dropped packets and some packets are read.
44 virtual bool ReadAndDispatchPackets(int fd, 44 virtual bool ReadAndDispatchPackets(int fd,
45 int port, 45 int port,
46 ProcessPacketInterface* processor, 46 ProcessPacketInterface* processor,
47 QuicPacketCount* packets_dropped); 47 QuicPacketCount* packets_dropped);
48 48
49 // Same as ReadAndDispatchPackets, only does one packet at a time. 49 // Same as ReadAndDispatchPackets, only does one packet at a time.
50 static bool ReadAndDispatchSinglePacket(int fd, 50 static bool ReadAndDispatchSinglePacket(int fd,
51 int port, 51 int port,
(...skipping 17 matching lines...) Expand all
69 // call on the packets. 69 // call on the packets.
70 struct sockaddr_storage raw_address_[kNumPacketsPerReadMmsgCall]; 70 struct sockaddr_storage raw_address_[kNumPacketsPerReadMmsgCall];
71 71
72 DISALLOW_COPY_AND_ASSIGN(QuicPacketReader); 72 DISALLOW_COPY_AND_ASSIGN(QuicPacketReader);
73 }; 73 };
74 74
75 } // namespace tools 75 } // namespace tools
76 } // namespace net 76 } // namespace net
77 77
78 #endif // NET_TOOLS_QUIC_QUIC_PACKET_READER_H_ 78 #endif // NET_TOOLS_QUIC_QUIC_PACKET_READER_H_
OLDNEW
« no previous file with comments | « net/quic/quic_flags.cc ('k') | net/tools/quic/quic_packet_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698