Summary:
The encoding logic is the same no matter what builder and what IOBuf
manipulater we use. Make these functions reusable.
This requires the QuicInteger encode function to support both BufAppender and
BufWriter. Note that the template is on a callable object. Because later on we
will also need to support wrapped memcpy that isn't a member function.
Reviewed By: mjoras
Differential Revision: D20781979
fbshipit-source-id: 1b8cbdfd7580132c113b12687f932d47207a7cce
Summary:
For padding frames we don't really need to know the exact number of padding frames in the packet,
but just that a padding frame exists.
This diff tries to collapse multiple sequential padding frames into 1 frame while decoding the packet.
While this wont collapse all padding frames, the common case is that padding is sequential and at the
end of the packet.
Reviewed By: JunqiWang
Differential Revision: D18901925
fbshipit-source-id: 17b4eeabdbf4df01c900a9d5078891eb64bf254a
Summary:
Don't clone during decoding a stream frame.
This uses a BufQueue to manage the data instead of passing around cursors.
Reviewed By: yangchi
Differential Revision: D18827718
fbshipit-source-id: 7874d308bb5f43b983b9965b2862e733a2107039
Summary:
Get rid of IObufQueue usage in the PacketBuilder and replace it with a vanilla IOBuf.
This requires replacing QueueAppender with something else as well, so this diff adds a new class call BufAppender which does exactly the same things as a QueueAppender.
Having a BufAppender will allow us to avoid cloning the stream buffer in the future and avoid a clone during the write path.
Reviewed By: mjoras
Differential Revision: D18673517
fbshipit-source-id: 31fd7758688686371d038111514eb62d6b21672c
Summary: remove the variant for codec result and replace it with a custom variant type
Reviewed By: yangchi
Differential Revision: D17247099
fbshipit-source-id: 19e24c14732eb6e8496aee7064f20c48bdf254e0
Summary:
Remove the variant type for RegularQuicPacket and VersionNegotiationPacket.
This allows us to move version negotiation parsing to be only used on the client and only done explicitly
before a version is negotiated.
Reviewed By: yangchi
Differential Revision: D17242788
fbshipit-source-id: 502caf6849f0b7e6778f1470dc160d01f17a33af
Summary:
Make a custom variant type for PacketHeader. By not relying on boost::variant
this reduces the code size of the implementation.
This uses a combination of a union type as well as a enum type to emulate a variant
Reviewed By: yangchi
Differential Revision: D17187589
fbshipit-source-id: 00c2b9b8dd3f3e73af766d84888b13b9d867165a
Summary: These were changed to varints. To support this we need to do some extra horrible version plumbing. I don't want to keep this long term but it works for now.
Reviewed By: yangchi
Differential Revision: D16293568
fbshipit-source-id: a9ea9083be160aa3e6b338a7d70d7f00e44ec5ab