OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef NET_QUIC_QUARTC_QUARTC_STREAM_H_ |
| 6 #define NET_QUIC_QUARTC_QUARTC_STREAM_H_ |
| 7 |
| 8 #include "net/quic/core/quic_session.h" |
| 9 #include "net/quic/core/reliable_quic_stream.h" |
| 10 #include "net/quic/quartc/quartc_stream_interface.h" |
| 11 |
| 12 namespace net { |
| 13 |
| 14 // Implements a QuartcStreamInterface using a ReliableQuicStream. |
| 15 class NET_EXPORT_PRIVATE QuartcStream : public ReliableQuicStream, |
| 16 public QuartcStreamInterface { |
| 17 public: |
| 18 QuartcStream(QuicStreamId id, QuicSession* session); |
| 19 |
| 20 ~QuartcStream() override; |
| 21 |
| 22 // ReliableQuicStream overrides. |
| 23 void OnDataAvailable() override; |
| 24 |
| 25 void OnClose() override; |
| 26 |
| 27 void OnCanWrite() override; |
| 28 |
| 29 // QuartcStreamInterface overrides. |
| 30 uint32_t stream_id() override; |
| 31 |
| 32 uint64_t buffered_amount() override; |
| 33 |
| 34 bool fin_sent() override; |
| 35 |
| 36 void Write(const char* data, |
| 37 size_t size, |
| 38 const WriteParameters& param) override; |
| 39 |
| 40 void Close() override; |
| 41 |
| 42 void SetDelegate(QuartcStreamInterface::Delegate* delegate) override; |
| 43 |
| 44 private: |
| 45 QuartcStreamInterface::Delegate* delegate_ = nullptr; |
| 46 }; |
| 47 |
| 48 } // namespace net |
| 49 |
| 50 #endif // NET_QUIC_QUARTC_STREAM_H_ |
OLD | NEW |