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

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

Issue 1811043002: Landing Recent QUIC changes until 2016-03-15 16:26 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add an export clause. Created 4 years, 9 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_spdy_client_stream_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 9b14424556368d27549c8a5a121804f43113c29f..1c878f1981012fdf18a1e39b07aea84ed55f95fc 100644
--- a/net/tools/quic/quic_server.cc
+++ b/net/tools/quic/quic_server.cc
@@ -26,9 +26,6 @@
#include "net/tools/quic/quic_packet_reader.h"
#include "net/tools/quic/quic_socket_utils.h"
-// TODO(rtenneti): Add support for MMSG_MORE.
-#define MMSG_MORE 0
-
#ifndef SO_RXQ_OVFL
#define SO_RXQ_OVFL 40
#endif
@@ -61,7 +58,6 @@ QuicServer::QuicServer(
fd_(-1),
packets_dropped_(0),
overflow_supported_(false),
- use_recvmmsg_(false),
config_(config),
crypto_config_(kSourceAddressTokenSecret,
QuicRandom::GetInstance(),
@@ -73,10 +69,6 @@ QuicServer::QuicServer(
}
void QuicServer::Initialize() {
-#if MMSG_MORE
- use_recvmmsg_ = true;
-#endif
-
// If an initial flow control window has not explicitly been set, then use a
// sensible value for a server: 1 MB for session, 64 KB for each stream.
const uint32_t kInitialSessionFlowControlWindow = 1 * 1024 * 1024; // 1 MB
@@ -175,15 +167,9 @@ void QuicServer::OnEvent(int fd, EpollEvent* event) {
DVLOG(1) << "EPOLLIN";
bool more_to_read = true;
while (more_to_read) {
- if (use_recvmmsg_) {
- more_to_read = packet_reader_->ReadAndDispatchPackets(
- fd_, port_, dispatcher_.get(),
- overflow_supported_ ? &packets_dropped_ : nullptr);
- } else {
- more_to_read = QuicPacketReader::ReadAndDispatchSinglePacket(
- fd_, port_, dispatcher_.get(),
- overflow_supported_ ? &packets_dropped_ : nullptr);
- }
+ more_to_read = packet_reader_->ReadAndDispatchPackets(
+ fd_, port_, dispatcher_.get(),
+ overflow_supported_ ? &packets_dropped_ : nullptr);
}
}
if (event->in_events & EPOLLOUT) {
« no previous file with comments | « net/tools/quic/quic_server.h ('k') | net/tools/quic/quic_spdy_client_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698