| OLD | NEW |
| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 void Shutdown(); | 53 void Shutdown(); |
| 54 | 54 |
| 55 // From EpollCallbackInterface | 55 // From EpollCallbackInterface |
| 56 void OnRegistration(EpollServer* eps, int fd, int event_mask) override {} | 56 void OnRegistration(EpollServer* eps, int fd, int event_mask) override {} |
| 57 void OnModification(int fd, int event_mask) override {} | 57 void OnModification(int fd, int event_mask) override {} |
| 58 void OnEvent(int fd, EpollEvent* event) override; | 58 void OnEvent(int fd, EpollEvent* event) override; |
| 59 void OnUnregistration(int fd, bool replaced) override {} | 59 void OnUnregistration(int fd, bool replaced) override {} |
| 60 | 60 |
| 61 void OnShutdown(EpollServer* eps, int fd) override {} | 61 void OnShutdown(EpollServer* eps, int fd) override {} |
| 62 | 62 |
| 63 void SetStrikeRegisterNoStartupPeriod() { | |
| 64 crypto_config_.set_strike_register_no_startup_period(); | |
| 65 } | |
| 66 | |
| 67 void SetChloMultiplier(size_t multiplier) { | 63 void SetChloMultiplier(size_t multiplier) { |
| 68 crypto_config_.set_chlo_multiplier(multiplier); | 64 crypto_config_.set_chlo_multiplier(multiplier); |
| 69 } | 65 } |
| 70 | 66 |
| 71 bool overflow_supported() { return overflow_supported_; } | 67 bool overflow_supported() { return overflow_supported_; } |
| 72 | 68 |
| 73 QuicPacketCount packets_dropped() { return packets_dropped_; } | 69 QuicPacketCount packets_dropped() { return packets_dropped_; } |
| 74 | 70 |
| 75 int port() { return port_; } | 71 int port() { return port_; } |
| 76 | 72 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 // Point to a QuicPacketReader object on the heap. The reader allocates more | 123 // Point to a QuicPacketReader object on the heap. The reader allocates more |
| 128 // space than allowed on the stack. | 124 // space than allowed on the stack. |
| 129 std::unique_ptr<QuicPacketReader> packet_reader_; | 125 std::unique_ptr<QuicPacketReader> packet_reader_; |
| 130 | 126 |
| 131 DISALLOW_COPY_AND_ASSIGN(QuicServer); | 127 DISALLOW_COPY_AND_ASSIGN(QuicServer); |
| 132 }; | 128 }; |
| 133 | 129 |
| 134 } // namespace net | 130 } // namespace net |
| 135 | 131 |
| 136 #endif // NET_TOOLS_QUIC_QUIC_SERVER_H_ | 132 #endif // NET_TOOLS_QUIC_QUIC_SERVER_H_ |
| OLD | NEW |