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_FRAMER_H_ | 5 #ifndef NET_QUIC_QUIC_FRAMER_H_ |
6 #define NET_QUIC_QUIC_FRAMER_H_ | 6 #define NET_QUIC_QUIC_FRAMER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 static size_t GetMinRstStreamFrameSize(QuicVersion quic_version); | 258 static size_t GetMinRstStreamFrameSize(QuicVersion quic_version); |
259 // Size in bytes of all connection close frame fields without the error | 259 // Size in bytes of all connection close frame fields without the error |
260 // details and the missing packets from the enclosed ack frame. | 260 // details and the missing packets from the enclosed ack frame. |
261 static size_t GetMinConnectionCloseFrameSize(); | 261 static size_t GetMinConnectionCloseFrameSize(); |
262 // Size in bytes of all GoAway frame fields without the reason phrase. | 262 // Size in bytes of all GoAway frame fields without the reason phrase. |
263 static size_t GetMinGoAwayFrameSize(); | 263 static size_t GetMinGoAwayFrameSize(); |
264 // Size in bytes of all WindowUpdate frame fields. | 264 // Size in bytes of all WindowUpdate frame fields. |
265 static size_t GetWindowUpdateFrameSize(); | 265 static size_t GetWindowUpdateFrameSize(); |
266 // Size in bytes of all Blocked frame fields. | 266 // Size in bytes of all Blocked frame fields. |
267 static size_t GetBlockedFrameSize(); | 267 static size_t GetBlockedFrameSize(); |
268 // The maximum number of nacks which can be transmitted in a single ack packet | |
269 // without exceeding kDefaultMaxPacketSize. | |
270 static size_t GetMaxUnackedPackets(QuicPacketHeader header); | |
271 // Size in bytes required to serialize the stream id. | 268 // Size in bytes required to serialize the stream id. |
272 static size_t GetStreamIdSize(QuicStreamId stream_id); | 269 static size_t GetStreamIdSize(QuicStreamId stream_id); |
273 // Size in bytes required to serialize the stream offset. | 270 // Size in bytes required to serialize the stream offset. |
274 static size_t GetStreamOffsetSize(QuicStreamOffset offset); | 271 static size_t GetStreamOffsetSize(QuicStreamOffset offset); |
275 // Size in bytes required for a serialized version negotiation packet | 272 // Size in bytes required for a serialized version negotiation packet |
276 static size_t GetVersionNegotiationPacketSize(size_t number_versions); | 273 static size_t GetVersionNegotiationPacketSize(size_t number_versions); |
277 | 274 |
278 // Returns the number of bytes added to the packet for the specified frame, | 275 // Returns the number of bytes added to the packet for the specified frame, |
279 // and 0 if the frame doesn't fit. Includes the header size for the first | 276 // and 0 if the frame doesn't fit. Includes the header size for the first |
280 // frame. | 277 // frame. |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 // The time this frames was created. Time written to the wire will be | 515 // The time this frames was created. Time written to the wire will be |
519 // written as a delta from this value. | 516 // written as a delta from this value. |
520 QuicTime creation_time_; | 517 QuicTime creation_time_; |
521 | 518 |
522 DISALLOW_COPY_AND_ASSIGN(QuicFramer); | 519 DISALLOW_COPY_AND_ASSIGN(QuicFramer); |
523 }; | 520 }; |
524 | 521 |
525 } // namespace net | 522 } // namespace net |
526 | 523 |
527 #endif // NET_QUIC_QUIC_FRAMER_H_ | 524 #endif // NET_QUIC_QUIC_FRAMER_H_ |
OLD | NEW |