mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 20:57:36 +03:00
add a tracer function to trace sending of Version Negotiation packets
This commit is contained in:
parent
21b9ef03be
commit
ecc8320c2c
7 changed files with 52 additions and 5 deletions
logging
|
@ -81,6 +81,16 @@ var _ = Describe("Tracing", func() {
|
|||
tracer.SentPacket(remote, hdr, 1024, []Frame{f})
|
||||
})
|
||||
|
||||
It("traces the PacketSent event", func() {
|
||||
remote := &net.UDPAddr{IP: net.IPv4(4, 3, 2, 1)}
|
||||
src := ArbitraryLenConnectionID{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}
|
||||
dest := ArbitraryLenConnectionID{1, 2, 3, 4}
|
||||
versions := []VersionNumber{1, 2, 3}
|
||||
tr1.EXPECT().SentVersionNegotiationPacket(remote, dest, src, versions)
|
||||
tr2.EXPECT().SentVersionNegotiationPacket(remote, dest, src, versions)
|
||||
tracer.SentVersionNegotiationPacket(remote, dest, src, versions)
|
||||
})
|
||||
|
||||
It("traces the PacketDropped event", func() {
|
||||
remote := &net.UDPAddr{IP: net.IPv4(4, 3, 2, 1)}
|
||||
tr1.EXPECT().DroppedPacket(remote, PacketTypeRetry, ByteCount(1024), PacketDropDuplicate)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue