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

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

Issue 123303003: Move all the packet parsing logic into QuicDispatcher from the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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_server_test.cc ('k') | net/tools/quic/quic_time_wait_list_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_time_wait_list_manager.h
diff --git a/net/tools/quic/quic_time_wait_list_manager.h b/net/tools/quic/quic_time_wait_list_manager.h
index bb24f144a022c776b6267ef325407542e8941150..ca8e1ee2995fe685183075858dcbe562a503b4e9 100644
--- a/net/tools/quic/quic_time_wait_list_manager.h
+++ b/net/tools/quic/quic_time_wait_list_manager.h
@@ -36,8 +36,7 @@ class QuicTimeWaitListManagerPeer;
// with the guid in time wait state. After the guid expires its time wait
// period, a new connection/session will be created if a packet is received
// for this guid.
-class QuicTimeWaitListManager : public QuicBlockedWriterInterface,
- public QuicFramerVisitorInterface {
+class QuicTimeWaitListManager : public QuicBlockedWriterInterface {
public:
// writer - the entity that writes to the socket. (Owned by the dispatcher)
// epoll_server - used to run clean up alarms. (Owned by the dispatcher)
@@ -68,7 +67,7 @@ class QuicTimeWaitListManager : public QuicBlockedWriterInterface,
virtual void ProcessPacket(const IPEndPoint& server_address,
const IPEndPoint& client_address,
QuicGuid guid,
- const QuicEncryptedPacket& packet);
+ QuicPacketSequenceNumber sequence_number);
// Called by the dispatcher when the underlying socket becomes writable again,
// since we might need to send pending public reset packets which we didn't
@@ -78,31 +77,9 @@ class QuicTimeWaitListManager : public QuicBlockedWriterInterface,
// Used to delete guid entries that have outlived their time wait period.
void CleanUpOldGuids();
- // QuicFramerVisitorInterface
- virtual void OnError(QuicFramer* framer) OVERRIDE;
- virtual bool OnProtocolVersionMismatch(QuicVersion received_version) OVERRIDE;
- virtual bool OnUnauthenticatedHeader(const QuicPacketHeader& header) OVERRIDE;
- virtual void OnPacket() OVERRIDE {}
- virtual void OnPublicResetPacket(
- const QuicPublicResetPacket& /*packet*/) OVERRIDE {}
- virtual void OnVersionNegotiationPacket(
- const QuicVersionNegotiationPacket& /*packet*/) OVERRIDE {}
-
- virtual void OnPacketComplete() OVERRIDE {}
- // The following methods should never get called because we always return
- // false from OnUnauthenticatedHeader(). We never process the encrypted bytes.
- virtual bool OnPacketHeader(const QuicPacketHeader& header) OVERRIDE;
- virtual void OnRevivedPacket() OVERRIDE;
- virtual void OnFecProtectedPayload(base::StringPiece /*payload*/) OVERRIDE;
- virtual bool OnStreamFrame(const QuicStreamFrame& /*frame*/) OVERRIDE;
- virtual bool OnAckFrame(const QuicAckFrame& /*frame*/) OVERRIDE;
- virtual bool OnCongestionFeedbackFrame(
- const QuicCongestionFeedbackFrame& /*frame*/) OVERRIDE;
- virtual bool OnRstStreamFrame(const QuicRstStreamFrame& /*frame*/) OVERRIDE;
- virtual bool OnConnectionCloseFrame(
- const QuicConnectionCloseFrame & /*frame*/) OVERRIDE;
- virtual bool OnGoAwayFrame(const QuicGoAwayFrame& /*frame*/) OVERRIDE;
- virtual void OnFecData(const QuicFecData& /*fec*/) OVERRIDE;
+ // Given a GUID that exists in the time wait list, returns the QuicVersion
+ // associated with it.
+ QuicVersion GetQuicVersionFromGuid(QuicGuid guid);
private:
friend class test::QuicTimeWaitListManagerPeer;
@@ -116,11 +93,6 @@ class QuicTimeWaitListManager : public QuicBlockedWriterInterface,
// received packets.
bool ShouldSendResponse(int received_packet_count);
- // Given a GUID that exists in the time wait list, returns the QuicVersion
- // associated with it. Used internally to set the framer version before
- // writing the public reset packet.
- QuicVersion GetQuicVersionFromGuid(QuicGuid guid);
-
// Creates a public reset packet and sends it or queues it to be sent later.
void SendPublicReset(const IPEndPoint& server_address,
const IPEndPoint& client_address,
@@ -164,13 +136,6 @@ class QuicTimeWaitListManager : public QuicBlockedWriterInterface,
// when we are given a chance to write by the dispatcher.
std::deque<QueuedPacket*> pending_packets_queue_;
- // Used to parse incoming packets.
- QuicFramer framer_;
-
- // Server and client address of the last packet processed.
- IPEndPoint server_address_;
- IPEndPoint client_address_;
-
// Used to schedule alarms to delete old guids which have been in the list for
// too long. Owned by the dispatcher.
EpollServer* epoll_server_;
« no previous file with comments | « net/tools/quic/quic_server_test.cc ('k') | net/tools/quic/quic_time_wait_list_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698