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

Side by Side Diff: net/quic/quic_message_stream.h

Issue 474383003: Initial P2P implementation for WebRTC on QUIC prototype Base URL: https://chromium.googlesource.com/chromium/src.git@tests-squashed
Patch Set: Created 6 years, 4 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 | « net/net.gypi ('k') | net/quic/quic_message_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 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 // The base class for streams which deliver data to/from an application.
6 // In each direction, the data on such a stream first contains compressed
7 // headers then body data.
8
9 #ifndef NET_QUIC_QUIC_MESSAGE_STREAM_H_
10 #define NET_QUIC_QUIC_MESSAGE_STREAM_H_
11
12 #include "net/quic/quic_data_stream.h"
13
14 namespace net {
15
16 // TODO(dmz) This should actually be a ReliableQuicStream
17 class NET_EXPORT_PRIVATE QuicMessageStream : public QuicDataStream {
18 public:
19 // Implement this to listen for reads
20 class ReadDelegate {
21 public:
22 virtual ~ReadDelegate() {}
23
24 virtual void OnStreamRead(QuicStreamId id,
25 const char* data,
26 uint32 data_len) = 0;
27 virtual void OnStreamClose(QuicStreamId) = 0;
28 };
29
30 QuicMessageStream(QuicStreamId id,
31 QuicSession* session,
32 ReadDelegate* delegate);
33
34 virtual ~QuicMessageStream();
35
36 int WriteStreamData(base::StringPiece data, bool fin);
37
38 virtual void OnClose() OVERRIDE;
39 virtual uint32 ProcessData(const char* data, uint32 data_len) OVERRIDE;
40
41 private:
42 ReadDelegate* delegate_; // Not owned
43
44 DISALLOW_COPY_AND_ASSIGN(QuicMessageStream);
45 };
46
47 } // namespace net
48
49 #endif // NET_QUIC_QUIC_MESSAGE_STREAM_H_
OLDNEW
« no previous file with comments | « net/net.gypi ('k') | net/quic/quic_message_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698