| Index: net/quic/quic_message_stream.h
|
| diff --git a/net/quic/quic_message_stream.h b/net/quic/quic_message_stream.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ee63b9b8e94dbfc77bdeea61d228ebc4dc5b3594
|
| --- /dev/null
|
| +++ b/net/quic/quic_message_stream.h
|
| @@ -0,0 +1,49 @@
|
| +// Copyright 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +//
|
| +// The base class for streams which deliver data to/from an application.
|
| +// In each direction, the data on such a stream first contains compressed
|
| +// headers then body data.
|
| +
|
| +#ifndef NET_QUIC_QUIC_MESSAGE_STREAM_H_
|
| +#define NET_QUIC_QUIC_MESSAGE_STREAM_H_
|
| +
|
| +#include "net/quic/quic_data_stream.h"
|
| +
|
| +namespace net {
|
| +
|
| +// TODO(dmz) This should actually be a ReliableQuicStream
|
| +class NET_EXPORT_PRIVATE QuicMessageStream : public QuicDataStream {
|
| + public:
|
| + // Implement this to listen for reads
|
| + class ReadDelegate {
|
| + public:
|
| + virtual ~ReadDelegate() {}
|
| +
|
| + virtual void OnStreamRead(QuicStreamId id,
|
| + const char* data,
|
| + uint32 data_len) = 0;
|
| + virtual void OnStreamClose(QuicStreamId) = 0;
|
| + };
|
| +
|
| + QuicMessageStream(QuicStreamId id,
|
| + QuicSession* session,
|
| + ReadDelegate* delegate);
|
| +
|
| + virtual ~QuicMessageStream();
|
| +
|
| + int WriteStreamData(base::StringPiece data, bool fin);
|
| +
|
| + virtual void OnClose() OVERRIDE;
|
| + virtual uint32 ProcessData(const char* data, uint32 data_len) OVERRIDE;
|
| +
|
| + private:
|
| + ReadDelegate* delegate_; // Not owned
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(QuicMessageStream);
|
| +};
|
| +
|
| +} // namespace net
|
| +
|
| +#endif // NET_QUIC_QUIC_MESSAGE_STREAM_H_
|
|
|