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 // Accumulates frames for the next packet until more frames no longer fit or | 5 // Accumulates frames for the next packet until more frames no longer fit or |
6 // it's time to create a packet from them. If multipath enabled, only creates | 6 // it's time to create a packet from them. If multipath enabled, only creates |
7 // packets on one path at the same time. Currently, next packet number is | 7 // packets on one path at the same time. Currently, next packet number is |
8 // tracked per-path. | 8 // tracked per-path. |
9 | 9 |
10 #ifndef NET_QUIC_QUIC_PACKET_CREATOR_H_ | 10 #ifndef NET_QUIC_QUIC_PACKET_CREATOR_H_ |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 DelegateInterface* delegate); | 62 DelegateInterface* delegate); |
63 | 63 |
64 ~QuicPacketCreator(); | 64 ~QuicPacketCreator(); |
65 | 65 |
66 // Makes the framer not serialize the protocol version in sent packets. | 66 // Makes the framer not serialize the protocol version in sent packets. |
67 void StopSendingVersion(); | 67 void StopSendingVersion(); |
68 | 68 |
69 // SetDiversificationNonce sets the nonce that will be sent in each public | 69 // SetDiversificationNonce sets the nonce that will be sent in each public |
70 // header of packets encrypted at the initial encryption level. Should only | 70 // header of packets encrypted at the initial encryption level. Should only |
71 // be called by servers. | 71 // be called by servers. |
72 void SetDiversificationNonce(const DiversificationNonce nonce); | 72 void SetDiversificationNonce(const DiversificationNonce& nonce); |
73 | 73 |
74 // Update the packet number length to use in future packets as soon as it | 74 // Update the packet number length to use in future packets as soon as it |
75 // can be safely changed. | 75 // can be safely changed. |
76 // TODO(fayang): Directly set packet number length instead of compute it in | 76 // TODO(fayang): Directly set packet number length instead of compute it in |
77 // creator. | 77 // creator. |
78 void UpdatePacketNumberLength(QuicPacketNumber least_packet_awaited_by_peer, | 78 void UpdatePacketNumberLength(QuicPacketNumber least_packet_awaited_by_peer, |
79 QuicPacketCount max_packets_in_flight); | 79 QuicPacketCount max_packets_in_flight); |
80 | 80 |
81 // The overhead the framing will add for a packet with one frame. | 81 // The overhead the framing will add for a packet with one frame. |
82 static size_t StreamFramePacketOverhead( | 82 static size_t StreamFramePacketOverhead( |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 | 343 |
344 // Map mapping path_id to last sent packet number on the path. | 344 // Map mapping path_id to last sent packet number on the path. |
345 std::unordered_map<QuicPathId, QuicPacketNumber> multipath_packet_number_; | 345 std::unordered_map<QuicPathId, QuicPacketNumber> multipath_packet_number_; |
346 | 346 |
347 DISALLOW_COPY_AND_ASSIGN(QuicPacketCreator); | 347 DISALLOW_COPY_AND_ASSIGN(QuicPacketCreator); |
348 }; | 348 }; |
349 | 349 |
350 } // namespace net | 350 } // namespace net |
351 | 351 |
352 #endif // NET_QUIC_QUIC_PACKET_CREATOR_H_ | 352 #endif // NET_QUIC_QUIC_PACKET_CREATOR_H_ |
OLD | NEW |