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

Unified Diff: net/quic/quic_server.h

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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/quic/quic_sent_packet_manager_test.cc ('k') | net/quic/quic_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_server.h
diff --git a/net/quic/quic_server.h b/net/quic/quic_server.h
deleted file mode 100644
index d53963e08306a746a3da51568feb2c6930dd32a8..0000000000000000000000000000000000000000
--- a/net/quic/quic_server.h
+++ /dev/null
@@ -1,119 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-//
-// A toy server, which listens on a specified address for QUIC traffic and
-// handles incoming responses.
-
-#ifndef NET_QUIC_QUIC_SERVER_H_
-#define NET_QUIC_QUIC_SERVER_H_
-
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-#include "net/base/io_buffer.h"
-#include "net/base/ip_endpoint.h"
-#include "net/base/net_log.h"
-#include "net/quic/crypto/quic_crypto_server_config.h"
-#include "net/quic/quic_clock.h"
-#include "net/quic/quic_config.h"
-#include "net/quic/quic_connection_helper.h"
-
-namespace net {
-
-
-namespace test {
-class QuicServerPeer;
-} // namespace test
-
-class QuicDispatcher;
-class UDPServerSocket;
-
-class QuicServer {
- public:
- QuicServer(const QuicConfig& config,
- const QuicVersionVector& supported_versions);
-
- virtual ~QuicServer();
-
- // Start listening on the specified address. Returns an error code.
- int Listen(const IPEndPoint& address);
-
- // Server deletion is imminent. Start cleaning up.
- void Shutdown();
-
- // Start reading on the socket. On asynchronous reads, this registers
- // OnReadComplete as the callback, which will then call StartReading again.
- void StartReading();
-
- // Called on reads that complete asynchronously. Dispatches the packet and
- // continues the read loop.
- void OnReadComplete(int result);
-
- void SetStrikeRegisterNoStartupPeriod() {
- crypto_config_.set_strike_register_no_startup_period();
- }
-
- // SetProofSource sets the ProofSource that will be used to verify the
- // server's certificate, and takes ownership of |source|.
- void SetProofSource(ProofSource* source) {
- crypto_config_.SetProofSource(source);
- }
-
- private:
- friend class net::test::QuicServerPeer;
-
- // Initialize the internal state of the server.
- void Initialize();
-
- // Accepts data from the framer and demuxes clients to sessions.
- scoped_ptr<QuicDispatcher> dispatcher_;
-
- // Used by the helper_ to time alarms.
- QuicClock clock_;
-
- // Used to manage the message loop.
- QuicConnectionHelper helper_;
-
- // Listening socket. Also used for outbound client communication.
- scoped_ptr<UDPServerSocket> socket_;
-
- // config_ contains non-crypto parameters that are negotiated in the crypto
- // handshake.
- QuicConfig config_;
- // crypto_config_ contains crypto parameters for the handshake.
- QuicCryptoServerConfig crypto_config_;
-
- // This vector contains QUIC versions which we currently support.
- // This should be ordered such that the highest supported version is the first
- // element, with subsequent elements in descending order (versions can be
- // skipped as necessary).
- QuicVersionVector supported_versions_;
-
- // The address that the server listens on.
- IPEndPoint server_address_;
-
- // Keeps track of whether a read is currently in flight, after which
- // OnReadComplete will be called.
- bool read_pending_;
-
- // The number of iterations of the read loop that have completed synchronously
- // and without posting a new task to the message loop.
- int synchronous_read_count_;
-
- // The target buffer of the current read.
- scoped_refptr<IOBufferWithSize> read_buffer_;
-
- // The source address of the current read.
- IPEndPoint client_address_;
-
- // The log to use for the socket.
- NetLog net_log_;
-
- base::WeakPtrFactory<QuicServer> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(QuicServer);
-};
-
-} // namespace net
-
-#endif // NET_QUIC_QUIC_SERVER_H_
« no previous file with comments | « net/quic/quic_sent_packet_manager_test.cc ('k') | net/quic/quic_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698