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

Side by Side Diff: net/tools/quic/quic_server.h

Issue 1128933010: Remove FLAGS_quic_use_optimized_packet_reader now that it's been (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Fixing_a_bug_in_the_QUIC_code_92727137
Patch Set: Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | net/tools/quic/quic_server.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // A toy server, which listens on a specified address for QUIC traffic and 5 // A toy server, which listens on a specified address for QUIC traffic and
6 // handles incoming responses. 6 // handles incoming responses.
7 // 7 //
8 // Note that this server is intended to verify correctness of the client and is 8 // Note that this server is intended to verify correctness of the client and is
9 // in no way expected to be performant. 9 // in no way expected to be performant.
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 // Server deletion is imminent. Start cleaning up the epoll server. 49 // Server deletion is imminent. Start cleaning up the epoll server.
50 void Shutdown(); 50 void Shutdown();
51 51
52 // From EpollCallbackInterface 52 // From EpollCallbackInterface
53 void OnRegistration(EpollServer* eps, int fd, int event_mask) override {} 53 void OnRegistration(EpollServer* eps, int fd, int event_mask) override {}
54 void OnModification(int fd, int event_mask) override {} 54 void OnModification(int fd, int event_mask) override {}
55 void OnEvent(int fd, EpollEvent* event) override; 55 void OnEvent(int fd, EpollEvent* event) override;
56 void OnUnregistration(int fd, bool replaced) override {} 56 void OnUnregistration(int fd, bool replaced) override {}
57 57
58 // Reads a number of packets from the given fd, and then passes them off to
59 // the QuicDispatcher. Returns true if some packets are read, false
60 // otherwise.
61 // If packets_dropped is non-null, the socket is configured to track
62 // dropped packets, and some packets are read, it will be set to the number of
63 // dropped packets.
64 static bool ReadAndDispatchPackets(int fd, int port,
65 ProcessPacketInterface* processor,
66 QuicPacketCount* packets_dropped);
67 // Same as ReadAndDispatchPackets, only does one packet at a time.
68 static bool ReadAndDispatchSinglePacket(int fd, int port,
69 ProcessPacketInterface* processor,
70 QuicPacketCount* packets_dropped);
71
72 void OnShutdown(EpollServer* eps, int fd) override {} 58 void OnShutdown(EpollServer* eps, int fd) override {}
73 59
74 void SetStrikeRegisterNoStartupPeriod() { 60 void SetStrikeRegisterNoStartupPeriod() {
75 crypto_config_.set_strike_register_no_startup_period(); 61 crypto_config_.set_strike_register_no_startup_period();
76 } 62 }
77 63
78 // SetProofSource sets the ProofSource that will be used to verify the 64 // SetProofSource sets the ProofSource that will be used to verify the
79 // server's certificate, and takes ownership of |source|. 65 // server's certificate, and takes ownership of |source|.
80 void SetProofSource(ProofSource* source) { 66 void SetProofSource(ProofSource* source) {
81 crypto_config_.SetProofSource(source); 67 crypto_config_.SetProofSource(source);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 132
147 scoped_ptr<QuicPacketReader> packet_reader_; 133 scoped_ptr<QuicPacketReader> packet_reader_;
148 134
149 DISALLOW_COPY_AND_ASSIGN(QuicServer); 135 DISALLOW_COPY_AND_ASSIGN(QuicServer);
150 }; 136 };
151 137
152 } // namespace tools 138 } // namespace tools
153 } // namespace net 139 } // namespace net
154 140
155 #endif // NET_TOOLS_QUIC_QUIC_SERVER_H_ 141 #endif // NET_TOOLS_QUIC_QUIC_SERVER_H_
OLDNEW
« no previous file with comments | « no previous file | net/tools/quic/quic_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698