mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-11-10 21:22:20 +03:00
Summary: Currently the packet builder contructor will encode the packet builder. This is fine when the builder creates its own output buffer. If later on we decides not to use this builder, or it fails to build packet, the buffer will be thrown away. But once the builder uses a buffer provided by caller, and will be reused, we can no longer just throw it away if we decide not to use this builder. So we have to delay the header encoding until we know we will use the builder. This is still not enough to solve the case where we want to use this builder, it builds, then it fails . For that, we will need to retreat the tail position of the IOBuf. Reviewed By: mjoras Differential Revision: D21000658 fbshipit-source-id: 4d758b3e260463b17c870618ba68bd4b898a7d4c
81 KiB
81 KiB