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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 static size_t GetMinStreamFrameSize(); | 224 static size_t GetMinStreamFrameSize(); |
225 // Size in bytes of all ack frame fields without the missing packets. | 225 // Size in bytes of all ack frame fields without the missing packets. |
226 static size_t GetMinAckFrameSize(); | 226 static size_t GetMinAckFrameSize(); |
227 // Size in bytes of all reset stream frame without the error details. | 227 // Size in bytes of all reset stream frame without the error details. |
228 static size_t GetMinRstStreamFrameSize(); | 228 static size_t GetMinRstStreamFrameSize(); |
229 // Size in bytes of all connection close frame fields without the error | 229 // Size in bytes of all connection close frame fields without the error |
230 // details and the missing packets from the enclosed ack frame. | 230 // details and the missing packets from the enclosed ack frame. |
231 static size_t GetMinConnectionCloseFrameSize(); | 231 static size_t GetMinConnectionCloseFrameSize(); |
232 // Size in bytes of all GoAway frame fields without the reason phrase. | 232 // Size in bytes of all GoAway frame fields without the reason phrase. |
233 static size_t GetMinGoAwayFrameSize(); | 233 static size_t GetMinGoAwayFrameSize(); |
| 234 // The maximum number of nacks which can be transmitted in a single ack packet |
| 235 // without exceeding kMaxPacketSize. |
| 236 static size_t GetMaxUnackedPackets(bool include_version); |
234 // Size in bytes required for a serialized version negotiation packet | 237 // Size in bytes required for a serialized version negotiation packet |
235 size_t GetVersionNegotiationPacketSize(size_t number_versions); | 238 size_t GetVersionNegotiationPacketSize(size_t number_versions); |
236 | 239 |
237 // Returns the number of bytes added to the packet for the specified frame, | 240 // Returns the number of bytes added to the packet for the specified frame, |
238 // and 0 if the frame doesn't fit. Includes the header size for the first | 241 // and 0 if the frame doesn't fit. Includes the header size for the first |
239 // frame. | 242 // frame. |
240 size_t GetSerializedFrameLength( | 243 size_t GetSerializedFrameLength( |
241 const QuicFrame& frame, size_t free_bytes, bool first_frame); | 244 const QuicFrame& frame, size_t free_bytes, bool first_frame); |
242 | 245 |
243 // Returns the associated data from the encrypted packet |encrypted| as a | 246 // Returns the associated data from the encrypted packet |encrypted| as a |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 // The time this frames was created. Time written to the wire will be | 420 // The time this frames was created. Time written to the wire will be |
418 // written as a delta from this value. | 421 // written as a delta from this value. |
419 QuicTime creation_time_; | 422 QuicTime creation_time_; |
420 | 423 |
421 DISALLOW_COPY_AND_ASSIGN(QuicFramer); | 424 DISALLOW_COPY_AND_ASSIGN(QuicFramer); |
422 }; | 425 }; |
423 | 426 |
424 } // namespace net | 427 } // namespace net |
425 | 428 |
426 #endif // NET_QUIC_QUIC_FRAMER_H_ | 429 #endif // NET_QUIC_QUIC_FRAMER_H_ |
OLD | NEW |