| OLD | NEW |
| 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 specific QuicSession subclass. | 5 // A server specific QuicSession subclass. |
| 6 | 6 |
| 7 #ifndef NET_QUIC_QUIC_SERVER_SESSION_H_ | 7 #ifndef NET_QUIC_QUIC_SERVER_SESSION_H_ |
| 8 #define NET_QUIC_QUIC_SERVER_SESSION_H_ | 8 #define NET_QUIC_QUIC_SERVER_SESSION_H_ |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 // An interface from the session to the entity owning the session. | 33 // An interface from the session to the entity owning the session. |
| 34 // This lets the session notify its owner (the Dispatcher) when the connection | 34 // This lets the session notify its owner (the Dispatcher) when the connection |
| 35 // is closed or blocked. | 35 // is closed or blocked. |
| 36 class QuicServerSessionVisitor { | 36 class QuicServerSessionVisitor { |
| 37 public: | 37 public: |
| 38 virtual ~QuicServerSessionVisitor() {} | 38 virtual ~QuicServerSessionVisitor() {} |
| 39 | 39 |
| 40 virtual void OnConnectionClosed(QuicConnectionId connection_id, | 40 virtual void OnConnectionClosed(QuicConnectionId connection_id, |
| 41 QuicErrorCode error) = 0; | 41 QuicErrorCode error) = 0; |
| 42 virtual void OnWriteBlocked(QuicBlockedWriterInterface* writer) = 0; | 42 virtual void OnWriteBlocked(QuicBlockedWriterInterface* blocked_writer) = 0; |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 class QuicServerSession : public QuicSession { | 45 class QuicServerSession : public QuicSession { |
| 46 public: | 46 public: |
| 47 // Takes ownership of connection_packet_writer | 47 // Takes ownership of connection_packet_writer |
| 48 QuicServerSession(const QuicConfig& config, | 48 QuicServerSession(const QuicConfig& config, |
| 49 QuicConnection* connection, | 49 QuicConnection* connection, |
| 50 QuicPerConnectionPacketWriter* connection_packet_writer, | 50 QuicPerConnectionPacketWriter* connection_packet_writer, |
| 51 QuicServerSessionVisitor* visitor); | 51 QuicServerSessionVisitor* visitor); |
| 52 | 52 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 scoped_ptr<QuicCryptoServerStream> crypto_stream_; | 85 scoped_ptr<QuicCryptoServerStream> crypto_stream_; |
| 86 scoped_ptr<QuicPerConnectionPacketWriter> connection_packet_writer_; | 86 scoped_ptr<QuicPerConnectionPacketWriter> connection_packet_writer_; |
| 87 QuicServerSessionVisitor* visitor_; | 87 QuicServerSessionVisitor* visitor_; |
| 88 | 88 |
| 89 DISALLOW_COPY_AND_ASSIGN(QuicServerSession); | 89 DISALLOW_COPY_AND_ASSIGN(QuicServerSession); |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 } // namespace net | 92 } // namespace net |
| 93 | 93 |
| 94 #endif // NET_QUIC_QUIC_SERVER_SESSION_H_ | 94 #endif // NET_QUIC_QUIC_SERVER_SESSION_H_ |
| OLD | NEW |