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

Unified Diff: net/tools/quic/quic_packet_reader.h

Issue 1810103002: Always use recvmmsg or recvmsg if it's available, and consolidate ReadAndDispatchPackets and ReadAn… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@116987771
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/tools/quic/quic_client.cc ('k') | net/tools/quic/quic_packet_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_packet_reader.h
diff --git a/net/tools/quic/quic_packet_reader.h b/net/tools/quic/quic_packet_reader.h
index 22a6f49d4aa8c84ddbe0b2969f1706ef4bcd3206..6ffe26bc2af68bb8c8aa436a041bebe937e60705 100644
--- a/net/tools/quic/quic_packet_reader.h
+++ b/net/tools/quic/quic_packet_reader.h
@@ -48,16 +48,22 @@ class QuicPacketReader {
ProcessPacketInterface* processor,
QuicPacketCount* packets_dropped);
- // Same as ReadAndDispatchPackets, only does one packet at a time.
+ private:
+ // Initialize the internal state of the reader.
+ void Initialize();
+
+ // Reads and dispatches many packets using recvmmsg.
+ bool ReadAndDispatchManyPackets(int fd,
+ int port,
+ ProcessPacketInterface* processor,
+ QuicPacketCount* packets_dropped);
+
+ // Reads and dispatches a single packet using recvmsg.
static bool ReadAndDispatchSinglePacket(int fd,
int port,
ProcessPacketInterface* processor,
QuicPacketCount* packets_dropped);
- private:
- // Initialize the internal state of the reader.
- void Initialize();
-
// Storage only used when recvmmsg is available.
#if MMSG_MORE
« no previous file with comments | « net/tools/quic/quic_client.cc ('k') | net/tools/quic/quic_packet_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698