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

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

Issue 839143002: Roll Chrome into Mojo. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rebase Created 5 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 unified diff | Download patch
« no previous file with comments | « net/tools/quic/quic_server.cc ('k') | net/tools/quic/quic_spdy_client_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 specific QuicSession subclass. 5 // A server specific QuicSession subclass.
6 6
7 #ifndef NET_TOOLS_QUIC_QUIC_SERVER_SESSION_H_ 7 #ifndef NET_TOOLS_QUIC_QUIC_SERVER_SESSION_H_
8 #define NET_TOOLS_QUIC_QUIC_SERVER_SESSION_H_ 8 #define NET_TOOLS_QUIC_QUIC_SERVER_SESSION_H_
9 9
10 #include <set> 10 #include <set>
(...skipping 16 matching lines...) Expand all
27 class ReliableQuicStream; 27 class ReliableQuicStream;
28 28
29 namespace tools { 29 namespace tools {
30 30
31 namespace test { 31 namespace test {
32 class QuicServerSessionPeer; 32 class QuicServerSessionPeer;
33 } // namespace test 33 } // namespace test
34 34
35 // An interface from the session to the entity owning the session. 35 // An interface from the session to the entity owning the session.
36 // This lets the session notify its owner (the Dispatcher) when the connection 36 // This lets the session notify its owner (the Dispatcher) when the connection
37 // is closed or blocked. 37 // is closed, blocked, or added/removed from the time-wait list.
38 class QuicServerSessionVisitor { 38 class QuicServerSessionVisitor {
39 public: 39 public:
40 virtual ~QuicServerSessionVisitor() {} 40 virtual ~QuicServerSessionVisitor() {}
41 41
42 virtual void OnConnectionClosed(QuicConnectionId connection_id, 42 virtual void OnConnectionClosed(QuicConnectionId connection_id,
43 QuicErrorCode error) = 0; 43 QuicErrorCode error) = 0;
44 virtual void OnWriteBlocked(QuicBlockedWriterInterface* blocked_writer) = 0; 44 virtual void OnWriteBlocked(QuicBlockedWriterInterface* blocked_writer) = 0;
45 // Called after the given connection is added to the time-wait list.
46 virtual void OnConnectionAddedToTimeWaitList(QuicConnectionId connection_id) {
47 }
48 // Called after the given connection is removed from the time-wait list.
49 virtual void OnConnectionRemovedFromTimeWaitList(
50 QuicConnectionId connection_id) {}
45 }; 51 };
46 52
47 class QuicServerSession : public QuicSession { 53 class QuicServerSession : public QuicSession {
48 public: 54 public:
49 QuicServerSession(const QuicConfig& config, 55 QuicServerSession(const QuicConfig& config,
50 QuicConnection* connection, 56 QuicConnection* connection,
51 QuicServerSessionVisitor* visitor); 57 QuicServerSessionVisitor* visitor);
52 58
53 // Override the base class to notify the owner of the connection close. 59 // Override the base class to notify the owner of the connection close.
54 void OnConnectionClosed(QuicErrorCode error, bool from_peer) override; 60 void OnConnectionClosed(QuicErrorCode error, bool from_peer) override;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // Number of packets sent to the peer, at the time we last sent a SCUP. 112 // Number of packets sent to the peer, at the time we last sent a SCUP.
107 int64 last_scup_sequence_number_; 113 int64 last_scup_sequence_number_;
108 114
109 DISALLOW_COPY_AND_ASSIGN(QuicServerSession); 115 DISALLOW_COPY_AND_ASSIGN(QuicServerSession);
110 }; 116 };
111 117
112 } // namespace tools 118 } // namespace tools
113 } // namespace net 119 } // namespace net
114 120
115 #endif // NET_TOOLS_QUIC_QUIC_SERVER_SESSION_H_ 121 #endif // NET_TOOLS_QUIC_QUIC_SERVER_SESSION_H_
OLDNEW
« no previous file with comments | « net/tools/quic/quic_server.cc ('k') | net/tools/quic/quic_spdy_client_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698