Index: webrtc/p2p/quic/reliablequicstream.h |
diff --git a/webrtc/p2p/quic/reliablequicstream.h b/webrtc/p2p/quic/reliablequicstream.h |
index 61d060f850b0ec723cc8f0ea8dbe18f0ebce609a..9493a3fcc184a4b650c540720c20e57bac08cffd 100644 |
--- a/webrtc/p2p/quic/reliablequicstream.h |
+++ b/webrtc/p2p/quic/reliablequicstream.h |
@@ -29,16 +29,23 @@ class ReliableQuicStream : public net::ReliableQuicStream, |
// ReliableQuicStream overrides. |
void OnDataAvailable() override; |
void OnClose() override; |
+ void OnCanWrite() override; |
// Process decrypted data into encrypted QUIC packets, which get sent to the |
// QuicPacketWriter. rtc::SR_BLOCK is returned if the operation blocks instead |
// of writing, in which case the data is queued until OnCanWrite() is called. |
- rtc::StreamResult Write(const char* data, size_t len); |
+ // If |fin| == true, then this stream closes after sending data. |
+ rtc::StreamResult Write(const char* data, size_t len, bool fin = false); |
+ // Removes this stream from the QuicSession's stream map. |
+ void Close(); |
// Called when decrypted data is ready to be read. |
sigslot::signal3<net::QuicStreamId, const char*, size_t> SignalDataReceived; |
- // Called when stream closed. |
- sigslot::signal2<net::QuicStreamId, net::QuicErrorCode> SignalClosed; |
+ // Called when the stream is closed. |
+ sigslot::signal2<net::QuicStreamId, int> SignalClosed; |
+ // Emits the number of queued bytes that were written by OnCanWrite(), after |
+ // the stream was previously write blocked. |
+ sigslot::signal2<net::QuicStreamId, uint64_t> SignalQueuedBytesWritten; |
private: |
RTC_DISALLOW_COPY_AND_ASSIGN(ReliableQuicStream); |