Skip to content

Commit

Permalink
quic: packet encoding/decoding
Browse files Browse the repository at this point in the history
Frame encoding is handled by the packetWriter type.
The packetWriter also takes responsibility for recording the contents
of constructed packets in a sentPacket structure.

Frame decoding is handled by consume*Frame functions, which generally
return the frame contents. ACK frames, which have complex contents,
are provided to the caller via callback function.

In addition to the above functions, used in the serving path, this
CL includes per-frame types that implement a common debugFrame
interface.  These types are used for tests and debug logging, but
not in the serving path where we want to avoid allocations from
storing values in an interface.

For golang/go#58547

Change-Id: I03ce11210aa9aa6ac749a5273b2ba9dd9c6989cf
Reviewed-on: https://go-review.googlesource.com/c/net/+/495355
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
  • Loading branch information
neild committed May 25, 2023
1 parent a233290 commit 1b5a2d8
Show file tree
Hide file tree
Showing 4 changed files with 2,290 additions and 0 deletions.
Loading

0 comments on commit 1b5a2d8

Please sign in to comment.