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

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

Issue 359653003: Simplify the QuicDispatcher::OnCanWrite logic (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
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 server side dispatcher which dispatches a given client's data to their 5 // A server side dispatcher which dispatches a given client's data to their
6 // stream. 6 // stream.
7 7
8 #ifndef NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ 8 #ifndef NET_TOOLS_QUIC_QUIC_DISPATCHER_H_
9 #define NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ 9 #define NET_TOOLS_QUIC_QUIC_DISPATCHER_H_
10 10
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 // Sends ConnectionClose frames to all connected clients. 91 // Sends ConnectionClose frames to all connected clients.
92 void Shutdown(); 92 void Shutdown();
93 93
94 // QuicServerSessionVisitor interface implementation: 94 // QuicServerSessionVisitor interface implementation:
95 // Ensure that the closed connection is cleaned up asynchronously. 95 // Ensure that the closed connection is cleaned up asynchronously.
96 virtual void OnConnectionClosed(QuicConnectionId connection_id, 96 virtual void OnConnectionClosed(QuicConnectionId connection_id,
97 QuicErrorCode error) OVERRIDE; 97 QuicErrorCode error) OVERRIDE;
98 98
99 // Queues the blocked writer for later resumption. 99 // Queues the blocked writer for later resumption.
100 virtual void OnWriteBlocked(QuicBlockedWriterInterface* writer) OVERRIDE; 100 virtual void OnWriteBlocked(QuicBlockedWriterInterface* blocked) OVERRIDE;
wtc 2014/06/27 17:08:01 Nit: This virtual method comes from the QuicServer
dmziegler 2014/06/27 17:26:42 I called it |blocked| in order to disambiguate it
ramant (doing other things) 2014/06/27 19:18:39 Changed it blocked_writer everywhere after talking
ramant (doing other things) 2014/06/27 19:18:39 Acknowledged.
101 101
102 typedef base::hash_map<QuicConnectionId, QuicSession*> SessionMap; 102 typedef base::hash_map<QuicConnectionId, QuicSession*> SessionMap;
103 103
104 // Deletes all sessions on the closed session list and clears the list. 104 // Deletes all sessions on the closed session list and clears the list.
105 void DeleteSessions(); 105 void DeleteSessions();
106 106
107 const SessionMap& session_map() const { return session_map_; } 107 const SessionMap& session_map() const { return session_map_; }
108 108
109 WriteBlockedList* write_blocked_list() { return &write_blocked_list_; }
110
111 protected: 109 protected:
112 // Instantiates a new low-level packet writer. Caller takes ownership of the 110 // Instantiates a new low-level packet writer. Caller takes ownership of the
113 // returned object. 111 // returned object.
114 virtual QuicPacketWriter* CreateWriter(int fd); 112 virtual QuicPacketWriter* CreateWriter(int fd);
115 113
116 virtual QuicSession* CreateQuicSession(QuicConnectionId connection_id, 114 virtual QuicSession* CreateQuicSession(QuicConnectionId connection_id,
117 const IPEndPoint& server_address, 115 const IPEndPoint& server_address,
118 const IPEndPoint& client_address); 116 const IPEndPoint& client_address);
119 117
120 virtual QuicConnection* CreateQuicConnection( 118 virtual QuicConnection* CreateQuicConnection(
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 QuicFramer framer_; 230 QuicFramer framer_;
233 scoped_ptr<QuicFramerVisitor> framer_visitor_; 231 scoped_ptr<QuicFramerVisitor> framer_visitor_;
234 232
235 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); 233 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher);
236 }; 234 };
237 235
238 } // namespace tools 236 } // namespace tools
239 } // namespace net 237 } // namespace net
240 238
241 #endif // NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ 239 #endif // NET_TOOLS_QUIC_QUIC_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698