OLD | NEW |
---|---|
(Empty) | |
1 /* | |
2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. | |
3 * | |
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 | |
6 * tree. An additional intellectual property rights grant can be found | |
7 * in the file PATENTS. All contributing project authors may | |
8 * be found in the AUTHORS file in the root of the source tree. | |
9 */ | |
10 | |
11 #ifndef WEBRTC_P2P_BASE_RELIABLEQUICSTREAM_H_ | |
12 #define WEBRTC_P2P_BASE_RELIABLEQUICSTREAM_H_ | |
13 | |
14 #include "net/quic/reliable_quic_stream.h" | |
15 | |
16 #include "webrtc/base/constructormagic.h" | |
17 | |
18 #include "webrtc/base/sigslot.h" | |
19 | |
20 namespace cricket { | |
21 | |
22 // Streams created by QuicSession | |
23 class ReliableQuicStream : public net::ReliableQuicStream, | |
24 public sigslot::has_slots<> { | |
25 public: | |
26 ReliableQuicStream(net::QuicStreamId id, net::QuicSession* session); | |
27 | |
28 ~ReliableQuicStream() override; | |
29 | |
30 // ReliableQuicStream overrides | |
31 void OnDataAvailable() override; | |
32 void OnClose() override; | |
33 net::SpdyPriority Priority() const override { return 0; } | |
34 | |
35 // Process decrypted data into encrypted QUIC packets, which | |
36 // get sent to the QuicPacketWriter | |
37 int Write(base::StringPiece data); | |
pthatcher1
2016/01/30 03:01:52
Can we make this take something that isn't Chrome-
mikescarlett
2016/02/03 17:41:01
I made this const char* and size_t
| |
38 | |
39 // Called when decrypted data is ready to be read | |
40 sigslot::signal3<net::QuicStreamId, const char*, size_t> SignalDataReceived; | |
41 // Called when stream closed | |
42 sigslot::signal2<net::QuicStreamId, net::QuicErrorCode> SignalStreamClosed; | |
pthatcher1
2016/01/30 03:01:52
Just SignalClosed would be sufficient.
mikescarlett
2016/02/03 17:41:01
Ok I renamed this SignalClosed.
| |
43 | |
44 private: | |
45 RTC_DISALLOW_COPY_AND_ASSIGN(ReliableQuicStream); | |
46 }; | |
47 | |
48 } // namespace cricket | |
49 | |
50 #endif // WEBRTC_P2P_BASE_RELIABLEQUICSTREAM_H_ | |
OLD | NEW |