diff options
Diffstat (limited to 'osp/impl/quic/quic_connection.h')
-rw-r--r-- | osp/impl/quic/quic_connection.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/osp/impl/quic/quic_connection.h b/osp/impl/quic/quic_connection.h index e00e25a0..6fbc81af 100644 --- a/osp/impl/quic/quic_connection.h +++ b/osp/impl/quic/quic_connection.h @@ -17,12 +17,14 @@ class QuicStream { public: class Delegate { public: - virtual ~Delegate() = default; virtual void OnReceived(QuicStream* stream, const char* data, size_t data_size) = 0; virtual void OnClose(uint64_t stream_id) = 0; + + protected: + virtual ~Delegate() = default; }; QuicStream(Delegate* delegate, uint64_t id) : delegate_(delegate), id_(id) {} @@ -41,7 +43,6 @@ class QuicConnection : public UdpSocket::Client { public: class Delegate { public: - virtual ~Delegate() = default; // Called when the QUIC handshake has successfully completed. virtual void OnCryptoHandshakeComplete(uint64_t connection_id) = 0; @@ -63,6 +64,9 @@ class QuicConnection : public UdpSocket::Client { // will be returned via OnIncomingStream immediately after this call. virtual QuicStream::Delegate* NextStreamDelegate(uint64_t connection_id, uint64_t stream_id) = 0; + + protected: + virtual ~Delegate() = default; }; explicit QuicConnection(Delegate* delegate) : delegate_(delegate) {} |