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

Unified Diff: webrtc/p2p/base/reliablequicstream.h

Issue 1648763002: Create QuicSession (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/p2p/base/reliablequicstream.h
diff --git a/webrtc/p2p/base/reliablequicstream.h b/webrtc/p2p/base/reliablequicstream.h
new file mode 100644
index 0000000000000000000000000000000000000000..2a369a931a77a7660cf9bb06c69c4e14b17094c1
--- /dev/null
+++ b/webrtc/p2p/base/reliablequicstream.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2011 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_P2P_BASE_RELIABLEQUICSTREAM_H_
+#define WEBRTC_P2P_BASE_RELIABLEQUICSTREAM_H_
+
+#include "net/quic/reliable_quic_stream.h"
+
+#include "webrtc/base/constructormagic.h"
+
+#include "webrtc/base/sigslot.h"
+
+namespace cricket {
+
+// Streams created by QuicSession
+class ReliableQuicStream : public net::ReliableQuicStream,
+ public sigslot::has_slots<> {
+ public:
+ ReliableQuicStream(net::QuicStreamId id, net::QuicSession* session);
+
+ ~ReliableQuicStream() override;
+
+ // ReliableQuicStream overrides
+ void OnDataAvailable() override;
+ void OnClose() override;
+ net::SpdyPriority Priority() const override { return 0; }
+
+ // Process decrypted data into encrypted QUIC packets, which
+ // get sent to the QuicPacketWriter
+ 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
+
+ // 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> 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.
+
+ private:
+ RTC_DISALLOW_COPY_AND_ASSIGN(ReliableQuicStream);
+};
+
+} // namespace cricket
+
+#endif // WEBRTC_P2P_BASE_RELIABLEQUICSTREAM_H_

Powered by Google App Engine
This is Rietveld 408576698