| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_QUIC_PROTOCOL_H_ | 5 #ifndef NET_QUIC_QUIC_PROTOCOL_H_ |
| 6 #define NET_QUIC_QUIC_PROTOCOL_H_ | 6 #define NET_QUIC_QUIC_PROTOCOL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <limits> | 10 #include <limits> |
| (...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 struct NET_EXPORT_PRIVATE QuicPaddingFrame {}; | 701 struct NET_EXPORT_PRIVATE QuicPaddingFrame {}; |
| 702 | 702 |
| 703 // A ping frame contains no payload, though it is retransmittable, | 703 // A ping frame contains no payload, though it is retransmittable, |
| 704 // and ACK'd just like other normal frames. | 704 // and ACK'd just like other normal frames. |
| 705 struct NET_EXPORT_PRIVATE QuicPingFrame {}; | 705 struct NET_EXPORT_PRIVATE QuicPingFrame {}; |
| 706 | 706 |
| 707 // A path MTU discovery frame contains no payload and is serialized as a ping | 707 // A path MTU discovery frame contains no payload and is serialized as a ping |
| 708 // frame. | 708 // frame. |
| 709 struct NET_EXPORT_PRIVATE QuicMtuDiscoveryFrame {}; | 709 struct NET_EXPORT_PRIVATE QuicMtuDiscoveryFrame {}; |
| 710 | 710 |
| 711 typedef scoped_ptr<char[]> UniqueStreamBuffer; | 711 // Deleter for stream buffers. |
| 712 class NET_EXPORT_PRIVATE StreamBufferDeleter { |
| 713 public: |
| 714 void operator()(char* buf) const; |
| 715 }; |
| 716 |
| 717 using UniqueStreamBuffer = std::unique_ptr<char[], StreamBufferDeleter>; |
| 712 | 718 |
| 713 // Allocates memory of size |size| for a QUIC stream buffer. | 719 // Allocates memory of size |size| for a QUIC stream buffer. |
| 714 UniqueStreamBuffer NewStreamBuffer(size_t size); | 720 UniqueStreamBuffer NewStreamBuffer(size_t size); |
| 715 | 721 |
| 716 struct NET_EXPORT_PRIVATE QuicStreamFrame { | 722 struct NET_EXPORT_PRIVATE QuicStreamFrame { |
| 717 QuicStreamFrame(); | 723 QuicStreamFrame(); |
| 718 QuicStreamFrame(QuicStreamId stream_id, | 724 QuicStreamFrame(QuicStreamId stream_id, |
| 719 bool fin, | 725 bool fin, |
| 720 QuicStreamOffset offset, | 726 QuicStreamOffset offset, |
| 721 base::StringPiece data); | 727 base::StringPiece data); |
| (...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1255 : iov(iov), iov_count(iov_count), total_length(total_length) {} | 1261 : iov(iov), iov_count(iov_count), total_length(total_length) {} |
| 1256 | 1262 |
| 1257 const struct iovec* iov; | 1263 const struct iovec* iov; |
| 1258 const int iov_count; | 1264 const int iov_count; |
| 1259 const size_t total_length; | 1265 const size_t total_length; |
| 1260 }; | 1266 }; |
| 1261 | 1267 |
| 1262 } // namespace net | 1268 } // namespace net |
| 1263 | 1269 |
| 1264 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 1270 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
| OLD | NEW |