| Index: net/quic/quic_dispatcher.h
|
| diff --git a/net/quic/quic_dispatcher.h b/net/quic/quic_dispatcher.h
|
| index 423afe64eb52a93acef4644982e6d439471af43e..92aa7349bad2f9eb4c4e4ae3354dcdd821fe0779 100644
|
| --- a/net/quic/quic_dispatcher.h
|
| +++ b/net/quic/quic_dispatcher.h
|
| @@ -18,6 +18,7 @@
|
| #include "net/quic/quic_blocked_writer_interface.h"
|
| #include "net/quic/quic_connection_helper.h"
|
| #include "net/quic/quic_protocol.h"
|
| +#include "net/quic/quic_server_packet_writer.h"
|
| #include "net/quic/quic_server_session.h"
|
| #include "net/quic/quic_time_wait_list_manager.h"
|
|
|
| @@ -36,9 +37,7 @@ namespace net {
|
|
|
| class QuicConfig;
|
| class QuicCryptoServerConfig;
|
| -class QuicPacketWriterWrapper;
|
| class QuicSession;
|
| -class UDPServerSocket;
|
|
|
| namespace test {
|
| class QuicDispatcherPeer;
|
| @@ -46,7 +45,8 @@ class QuicDispatcherPeer;
|
|
|
| class DeleteSessionsAlarm;
|
|
|
| -class QuicDispatcher : public QuicServerSessionVisitor {
|
| +class QuicDispatcher : public QuicServerSessionVisitor,
|
| + public QuicBlockedWriterInterface {
|
| public:
|
| // Ideally we'd have a linked_hash_set: the boolean is unused.
|
| typedef linked_hash_map<QuicBlockedWriterInterface*, bool> WriteBlockedList;
|
| @@ -63,7 +63,7 @@ class QuicDispatcher : public QuicServerSessionVisitor {
|
| virtual ~QuicDispatcher();
|
|
|
| // Takes ownership of the packet writer
|
| - virtual void Initialize(QuicPacketWriter* writer);
|
| + virtual void Initialize(QuicServerPacketWriter* writer);
|
|
|
| // Process the incoming packet by creating a new session, passing it to
|
| // an existing session, or passing it to the TimeWaitListManager.
|
| @@ -71,15 +71,16 @@ class QuicDispatcher : public QuicServerSessionVisitor {
|
| const IPEndPoint& client_address,
|
| const QuicEncryptedPacket& packet);
|
|
|
| - // Called when the socket becomes writable to allow queued writes to happen.
|
| - virtual void OnCanWrite();
|
| -
|
| // Returns true if there's anything in the blocked writer list.
|
| virtual bool HasPendingWrites() const;
|
|
|
| // Sends ConnectionClose frames to all connected clients.
|
| void Shutdown();
|
|
|
| + // QuicBlockedWriterInterface implementation:
|
| + // Called when the socket becomes writable to allow queued writes to happen.
|
| + virtual void OnCanWrite() OVERRIDE;
|
| +
|
| // QuicServerSessionVisitor interface implementation:
|
| // Ensure that the closed connection is cleaned up asynchronously.
|
| virtual void OnConnectionClosed(QuicConnectionId connection_id,
|
| @@ -116,7 +117,7 @@ class QuicDispatcher : public QuicServerSessionVisitor {
|
| virtual QuicTimeWaitListManager* CreateQuicTimeWaitListManager();
|
|
|
| // Replaces the packet writer with |writer|. Takes ownership of |writer|.
|
| - void set_writer(QuicPacketWriter* writer) {
|
| + void set_writer(QuicServerPacketWriter* writer) {
|
| writer_.reset(writer);
|
| }
|
|
|
| @@ -155,7 +156,7 @@ class QuicDispatcher : public QuicServerSessionVisitor {
|
|
|
| QuicConnectionHelperInterface* helper() { return helper_; }
|
|
|
| - QuicPacketWriter* writer() { return writer_.get(); }
|
| + QuicServerPacketWriter* writer() { return writer_.get(); }
|
|
|
| uint32 initial_flow_control_window_bytes() const {
|
| return initial_flow_control_window_bytes_;
|
| @@ -197,7 +198,7 @@ class QuicDispatcher : public QuicServerSessionVisitor {
|
| std::list<QuicSession*> closed_session_list_;
|
|
|
| // The writer to write to the socket with.
|
| - scoped_ptr<QuicPacketWriter> writer_;
|
| + scoped_ptr<QuicServerPacketWriter> writer_;
|
|
|
| // This vector contains QUIC versions which we currently support.
|
| // This should be ordered such that the highest supported version is the first
|
|
|