Index: net/tools/quic/quic_dispatcher.h |
diff --git a/net/tools/quic/quic_dispatcher.h b/net/tools/quic/quic_dispatcher.h |
index 58a4c0c14232c4aa894d39428e5dcb38dff6bb5d..0cc978be240be0a82b7fe923040be400a7f695ff 100644 |
--- a/net/tools/quic/quic_dispatcher.h |
+++ b/net/tools/quic/quic_dispatcher.h |
@@ -76,8 +76,6 @@ class QuicDispatcher : public QuicPacketWriter, public QuicSessionOwner { |
// an existing session, or passing it to the TimeWaitListManager. |
virtual void ProcessPacket(const IPEndPoint& server_address, |
const IPEndPoint& client_address, |
- QuicGuid guid, |
- bool has_version_flag, |
const QuicEncryptedPacket& packet); |
// Called when the underyling connection becomes writable to allow |
@@ -128,13 +126,36 @@ class QuicDispatcher : public QuicPacketWriter, public QuicSessionOwner { |
return supported_versions_; |
} |
+ protected: |
+ // Called by |framer_visitor_| when the public header has been parsed. |
+ virtual bool OnUnauthenticatedPublicHeader( |
+ const QuicPacketPublicHeader& header); |
+ |
+ // Information about the packet currently being dispatched. |
+ const IPEndPoint& current_client_address() { |
+ return current_client_address_; |
+ } |
+ const IPEndPoint& current_server_address() { |
+ return current_server_address_; |
+ } |
+ const QuicEncryptedPacket& current_packet() { |
+ return *current_packet_; |
+ } |
+ |
private: |
+ class QuicFramerVisitor; |
friend class net::tools::test::QuicDispatcherPeer; |
+ // Called by |framer_visitor_| when the private header has been parsed |
+ // of a data packet that is destined for the time wait manager. |
+ void OnUnauthenticatedHeader(const QuicPacketHeader& header); |
+ |
// Removes the session from the session map and write blocked list, and |
// adds the GUID to the time-wait list. |
void CleanUpSession(SessionMap::iterator it); |
+ bool HandlePacketForTimeWait(const QuicPacketPublicHeader& header); |
+ |
// The list of connections waiting to write. |
WriteBlockedList write_blocked_list_; |
@@ -170,6 +191,14 @@ class QuicDispatcher : public QuicPacketWriter, public QuicSessionOwner { |
// skipped as necessary). |
const QuicVersionVector supported_versions_; |
+ // Information about the packet currently being handled. |
+ IPEndPoint current_client_address_; |
+ IPEndPoint current_server_address_; |
+ const QuicEncryptedPacket* current_packet_; |
+ |
+ QuicFramer framer_; |
+ scoped_ptr<QuicFramerVisitor> framer_visitor_; |
+ |
DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); |
}; |