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

Unified Diff: net/tools/quic/quic_dispatcher.h

Issue 131743007: Remove WritePacket() from internal server's QuicDispatcher; (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | « no previous file | net/tools/quic/quic_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_dispatcher.h
diff --git a/net/tools/quic/quic_dispatcher.h b/net/tools/quic/quic_dispatcher.h
index a3482b8dc28679b54b780e8cf65279652713752b..577b4d0dc3659332a5664077e940a4b073c6c916 100644
--- a/net/tools/quic/quic_dispatcher.h
+++ b/net/tools/quic/quic_dispatcher.h
@@ -64,10 +64,12 @@ class QuicDispatcher : public QuicPacketWriter, public QuicSessionOwner {
QuicDispatcher(const QuicConfig& config,
const QuicCryptoServerConfig& crypto_config,
const QuicVersionVector& supported_versions,
- int fd,
EpollServer* epoll_server);
+
virtual ~QuicDispatcher();
+ void Initialize(int fd);
+
// QuicPacketWriter
virtual WriteResult WritePacket(
const char* buffer, size_t buf_len,
@@ -96,9 +98,6 @@ class QuicDispatcher : public QuicPacketWriter, public QuicSessionOwner {
// Ensure that the closed connection is cleaned up asynchronously.
virtual void OnConnectionClosed(QuicGuid guid, QuicErrorCode error) OVERRIDE;
- // Replaces the packet writer with one that uses |fd|.
- void set_fd(int fd);
-
typedef base::hash_map<QuicGuid, QuicSession*> SessionMap;
virtual QuicSession* CreateQuicSession(
@@ -114,6 +113,18 @@ class QuicDispatcher : public QuicPacketWriter, public QuicSessionOwner {
WriteBlockedList* write_blocked_list() { return &write_blocked_list_; }
protected:
+ // Instantiates a new low-level packet writer. Caller takes ownership of the
+ // returned object.
+ QuicPacketWriter* CreateWriter(int fd);
+
+ // Instantiates a new top-level writer wrapper. Takes ownership of |writer|.
+ // Caller takes ownership of the returned object.
+ virtual QuicPacketWriterWrapper* CreateWriterWrapper(
+ QuicPacketWriter* writer);
+
+ // Replaces the packet writer with |writer|. Takes ownership of |writer|.
+ void set_writer(QuicPacketWriter* writer);
+
QuicTimeWaitListManager* time_wait_list_manager() {
return time_wait_list_manager_.get();
}
« no previous file with comments | « no previous file | net/tools/quic/quic_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698