Commit cf6934e4 authored by rch's avatar rch Committed by Commit bot

Cleanup QUIC code to sync with internal version after recent changes.

Review URL: https://codereview.chromium.org/1034283002

Cr-Commit-Position: refs/heads/master@{#322524}
parent ead83696
......@@ -19,7 +19,7 @@ namespace tools {
namespace test {
class QuicInMemoryCachePeer;
} // namespace
} // namespace test
class QuicServer;
......
......@@ -287,6 +287,8 @@ bool QuicServer::ReadAndDispatchSinglePacket(int fd,
IPEndPoint server_address(server_ip, port);
processor->ProcessPacket(server_address, client_address, packet);
// The socket read was successful, so return true even if packet dispatch
// failed.
return true;
}
......
......@@ -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);
......
......@@ -6,7 +6,6 @@
#include <errno.h>
#include "base/containers/hash_tables.h"
#include "base/memory/scoped_ptr.h"
#include "base/stl_util.h"
#include "net/base/ip_endpoint.h"
......@@ -25,9 +24,6 @@ using base::StringPiece;
namespace net {
namespace tools {
// TODO(rtenneti): Remove the duplicated code in this file. Share code with
// "net/quic/quic_time_wait_list_manager.cc"
// A very simple alarm that just informs the QuicTimeWaitListManager to clean
// up old connection_ids. This alarm should be cancelled and deleted before
// the QuicTimeWaitListManager is deleted.
......
......@@ -12,8 +12,6 @@
#include <deque>
#include "base/basictypes.h"
#include "base/containers/hash_tables.h"
#include "base/strings/string_piece.h"
#include "net/base/linked_hash_map.h"
#include "net/quic/quic_blocked_writer_interface.h"
#include "net/quic/quic_connection.h"
......@@ -22,10 +20,8 @@
#include "net/quic/quic_protocol.h"
namespace net {
namespace tools {
class ConnectionIdCleanUpAlarm;
class QuicServerSessionVisitor;
namespace test {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment