| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_QUIC_P2P_QUIC_P2P_STREAM_H_ | 5 #ifndef NET_QUIC_P2P_QUIC_P2P_STREAM_H_ |
| 6 #define NET_QUIC_P2P_QUIC_P2P_STREAM_H_ | 6 #define NET_QUIC_P2P_QUIC_P2P_STREAM_H_ |
| 7 | 7 |
| 8 #include "net/base/completion_callback.h" | 8 #include "net/base/completion_callback.h" |
| 9 #include "net/base/net_export.h" | 9 #include "net/base/net_export.h" |
| 10 #include "net/quic/reliable_quic_stream.h" | 10 #include "net/quic/reliable_quic_stream.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 QuicP2PStream(QuicStreamId id, QuicSession* session); | 35 QuicP2PStream(QuicStreamId id, QuicSession* session); |
| 36 | 36 |
| 37 ~QuicP2PStream() override; | 37 ~QuicP2PStream() override; |
| 38 | 38 |
| 39 // ReliableQuicStream overrides. | 39 // ReliableQuicStream overrides. |
| 40 void OnDataAvailable() override; | 40 void OnDataAvailable() override; |
| 41 void OnClose() override; | 41 void OnClose() override; |
| 42 void OnCanWrite() override; | 42 void OnCanWrite() override; |
| 43 QuicPriority EffectivePriority() const override; | 43 SpdyPriority Priority() const override; |
| 44 | 44 |
| 45 void WriteHeader(base::StringPiece data); | 45 void WriteHeader(base::StringPiece data); |
| 46 | 46 |
| 47 int Write(base::StringPiece data, const CompletionCallback& callback); | 47 int Write(base::StringPiece data, const CompletionCallback& callback); |
| 48 | 48 |
| 49 void SetDelegate(Delegate* delegate); | 49 void SetDelegate(Delegate* delegate); |
| 50 Delegate* GetDelegate() { return delegate_; } | 50 Delegate* GetDelegate() { return delegate_; } |
| 51 | 51 |
| 52 private: | 52 private: |
| 53 Delegate* delegate_ = nullptr; | 53 Delegate* delegate_ = nullptr; |
| 54 | 54 |
| 55 QuicPriority priority_ = 0; | 55 SpdyPriority priority_ = 0; |
| 56 | 56 |
| 57 CompletionCallback write_callback_; | 57 CompletionCallback write_callback_; |
| 58 int last_write_size_ = 0; | 58 int last_write_size_ = 0; |
| 59 | 59 |
| 60 DISALLOW_COPY_AND_ASSIGN(QuicP2PStream); | 60 DISALLOW_COPY_AND_ASSIGN(QuicP2PStream); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 } // namespace net | 63 } // namespace net |
| 64 | 64 |
| 65 #endif // NET_QUIC_P2P_QUIC_P2P_STREAM_H_ | 65 #endif // NET_QUIC_P2P_QUIC_P2P_STREAM_H_ |
| OLD | NEW |