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

Unified Diff: net/tools/quic/quic_server.cc

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.h ('k') | net/tools/quic/quic_server_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_server.cc
diff --git a/net/tools/quic/quic_server.cc b/net/tools/quic/quic_server.cc
index a62cfbbdf1519732921427ec27133fab7f078ff4..cdf7f6315ca61593d7772ae50f1a68fd5c8842a9 100644
--- a/net/tools/quic/quic_server.cc
+++ b/net/tools/quic/quic_server.cc
@@ -191,21 +191,6 @@ void QuicServer::OnEvent(int fd, EpollEvent* event) {
}
/* static */
-void QuicServer::MaybeDispatchPacket(QuicDispatcher* dispatcher,
- const QuicEncryptedPacket& packet,
- const IPEndPoint& server_address,
- const IPEndPoint& client_address) {
- QuicGuid guid;
- if (!QuicFramer::ReadGuidFromPacket(packet, &guid)) {
- return;
- }
-
- bool has_version_flag = QuicFramer::HasVersionFlag(packet);
-
- dispatcher->ProcessPacket(
- server_address, client_address, guid, has_version_flag, packet);
-}
-
bool QuicServer::ReadAndDispatchSinglePacket(int fd,
int port,
QuicDispatcher* dispatcher,
@@ -228,7 +213,7 @@ bool QuicServer::ReadAndDispatchSinglePacket(int fd,
QuicEncryptedPacket packet(buf, bytes_read, false);
IPEndPoint server_address(server_ip, port);
- MaybeDispatchPacket(dispatcher, packet, server_address, client_address);
+ dispatcher->ProcessPacket(server_address, client_address, packet);
return true;
}
« no previous file with comments | « net/tools/quic/quic_server.h ('k') | net/tools/quic/quic_server_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698