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

Side by Side Diff: net/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, 5 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
« no previous file with comments | « no previous file | net/quic/quic_dispatcher.cc » ('j') | net/tools/quic/quic_dispatcher.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_QUIC_QUIC_DISPATCHER_H_ 8 #ifndef NET_QUIC_QUIC_DISPATCHER_H_
9 #define NET_QUIC_QUIC_DISPATCHER_H_ 9 #define NET_QUIC_QUIC_DISPATCHER_H_
10 10
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // QuicBlockedWriterInterface implementation: 88 // QuicBlockedWriterInterface implementation:
89 // Called when the socket becomes writable to allow queued writes to happen. 89 // Called when the socket becomes writable to allow queued writes to happen.
90 virtual void OnCanWrite() OVERRIDE; 90 virtual void OnCanWrite() OVERRIDE;
91 91
92 // QuicServerSessionVisitor interface implementation: 92 // QuicServerSessionVisitor interface implementation:
93 // Ensure that the closed connection is cleaned up asynchronously. 93 // Ensure that the closed connection is cleaned up asynchronously.
94 virtual void OnConnectionClosed(QuicConnectionId connection_id, 94 virtual void OnConnectionClosed(QuicConnectionId connection_id,
95 QuicErrorCode error) OVERRIDE; 95 QuicErrorCode error) OVERRIDE;
96 96
97 // Queues the blocked writer for later resumption. 97 // Queues the blocked writer for later resumption.
98 virtual void OnWriteBlocked(QuicBlockedWriterInterface* writer) OVERRIDE; 98 virtual void OnWriteBlocked(QuicBlockedWriterInterface* blocked) OVERRIDE;
99 99
100 typedef base::hash_map<QuicConnectionId, QuicSession*> SessionMap; 100 typedef base::hash_map<QuicConnectionId, QuicSession*> SessionMap;
101 101
102 // Deletes all sessions on the closed session list and clears the list. 102 // Deletes all sessions on the closed session list and clears the list.
103 void DeleteSessions(); 103 void DeleteSessions();
104 104
105 const SessionMap& session_map() const { return session_map_; } 105 const SessionMap& session_map() const { return session_map_; }
106 106
107 WriteBlockedList* write_blocked_list() { return &write_blocked_list_; }
108
109 protected: 107 protected:
110 virtual QuicSession* CreateQuicSession(QuicConnectionId connection_id, 108 virtual QuicSession* CreateQuicSession(QuicConnectionId connection_id,
111 const IPEndPoint& server_address, 109 const IPEndPoint& server_address,
112 const IPEndPoint& client_address); 110 const IPEndPoint& client_address);
113 111
114 virtual QuicConnection* CreateQuicConnection( 112 virtual QuicConnection* CreateQuicConnection(
115 QuicConnectionId connection_id, 113 QuicConnectionId connection_id,
116 const IPEndPoint& server_address, 114 const IPEndPoint& server_address,
117 const IPEndPoint& client_address, 115 const IPEndPoint& client_address,
118 QuicPerConnectionPacketWriter* writer); 116 QuicPerConnectionPacketWriter* writer);
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 220
223 QuicFramer framer_; 221 QuicFramer framer_;
224 scoped_ptr<QuicFramerVisitor> framer_visitor_; 222 scoped_ptr<QuicFramerVisitor> framer_visitor_;
225 223
226 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); 224 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher);
227 }; 225 };
228 226
229 } // namespace net 227 } // namespace net
230 228
231 #endif // NET_QUIC_QUIC_DISPATCHER_H_ 229 #endif // NET_QUIC_QUIC_DISPATCHER_H_
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_dispatcher.cc » ('j') | net/tools/quic/quic_dispatcher.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698