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

Side by Side Diff: webrtc/p2p/quic/reliablequicstream.h

Issue 1856513002: Add QuicTransportChannel methods for QUIC streams (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add back quicsession.h comment Created 4 years, 8 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 | « webrtc/p2p/quic/quictransportchannel_unittest.cc ('k') | webrtc/p2p/quic/reliablequicstream.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 /* 1 /*
2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 11 matching lines...) Expand all
22 class ReliableQuicStream : public net::ReliableQuicStream, 22 class ReliableQuicStream : public net::ReliableQuicStream,
23 public sigslot::has_slots<> { 23 public sigslot::has_slots<> {
24 public: 24 public:
25 ReliableQuicStream(net::QuicStreamId id, net::QuicSession* session); 25 ReliableQuicStream(net::QuicStreamId id, net::QuicSession* session);
26 26
27 ~ReliableQuicStream() override; 27 ~ReliableQuicStream() override;
28 28
29 // ReliableQuicStream overrides. 29 // ReliableQuicStream overrides.
30 void OnDataAvailable() override; 30 void OnDataAvailable() override;
31 void OnClose() override; 31 void OnClose() override;
32 void OnCanWrite() override;
32 33
33 // Process decrypted data into encrypted QUIC packets, which get sent to the 34 // Process decrypted data into encrypted QUIC packets, which get sent to the
34 // QuicPacketWriter. rtc::SR_BLOCK is returned if the operation blocks instead 35 // QuicPacketWriter. rtc::SR_BLOCK is returned if the operation blocks instead
35 // of writing, in which case the data is queued until OnCanWrite() is called. 36 // of writing, in which case the data is queued until OnCanWrite() is called.
36 rtc::StreamResult Write(const char* data, size_t len); 37 // If |fin| == true, then this stream closes after sending data.
38 rtc::StreamResult Write(const char* data, size_t len, bool fin = false);
39 // Removes this stream from the QuicSession's stream map.
40 void Close();
37 41
38 // Called when decrypted data is ready to be read. 42 // Called when decrypted data is ready to be read.
39 sigslot::signal3<net::QuicStreamId, const char*, size_t> SignalDataReceived; 43 sigslot::signal3<net::QuicStreamId, const char*, size_t> SignalDataReceived;
40 // Called when stream closed. 44 // Called when the stream is closed.
41 sigslot::signal2<net::QuicStreamId, net::QuicErrorCode> SignalClosed; 45 sigslot::signal2<net::QuicStreamId, int> SignalClosed;
46 // Emits the number of queued bytes that were written by OnCanWrite(), after
47 // the stream was previously write blocked.
48 sigslot::signal2<net::QuicStreamId, uint64_t> SignalQueuedBytesWritten;
42 49
43 private: 50 private:
44 RTC_DISALLOW_COPY_AND_ASSIGN(ReliableQuicStream); 51 RTC_DISALLOW_COPY_AND_ASSIGN(ReliableQuicStream);
45 }; 52 };
46 53
47 } // namespace cricket 54 } // namespace cricket
48 55
49 #endif // WEBRTC_P2P_QUIC_RELIABLEQUICSTREAM_H_ 56 #endif // WEBRTC_P2P_QUIC_RELIABLEQUICSTREAM_H_
OLDNEW
« no previous file with comments | « webrtc/p2p/quic/quictransportchannel_unittest.cc ('k') | webrtc/p2p/quic/reliablequicstream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698