Index: net/tools/quic/quic_server.h |
diff --git a/net/tools/quic/quic_server.h b/net/tools/quic/quic_server.h |
index 2313601aa47b5ba5e4aed04e65714f9527d8663a..6ff8c53066c55593f5c661fd552c9c181a66a268 100644 |
--- a/net/tools/quic/quic_server.h |
+++ b/net/tools/quic/quic_server.h |
@@ -19,7 +19,6 @@ |
#include "net/tools/quic/quic_default_packet_writer.h" |
namespace net { |
- |
namespace tools { |
namespace test { |
@@ -53,12 +52,16 @@ class QuicServer : public EpollCallbackInterface { |
void OnEvent(int fd, EpollEvent* event) override; |
void OnUnregistration(int fd, bool replaced) override {} |
- // Reads a packet from the given fd, and then passes it off to |
- // the QuicDispatcher. Returns true if a packet is read, false |
+ // Reads a number of packets from the given fd, and then passes them off to |
+ // the QuicDispatcher. Returns true if some packets are read, false |
// otherwise. |
// If packets_dropped is non-null, the socket is configured to track |
// dropped packets, and some packets are read, it will be set to the number of |
// dropped packets. |
+ static bool ReadAndDispatchPackets(int fd, int port, |
+ ProcessPacketInterface* processor, |
+ QuicPacketCount* packets_dropped); |
+ // Same as ReadAndDispatchPackets, only does one packet at a time. |
static bool ReadAndDispatchSinglePacket(int fd, int port, |
ProcessPacketInterface* processor, |
QuicPacketCount* packets_dropped); |