mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 04:37:36 +03:00
introduce separate tracing calls for sent long and short header packets
This commit is contained in:
parent
9e5f92b561
commit
24be84cd00
14 changed files with 127 additions and 61 deletions
|
@ -16,16 +16,13 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
sentHeaders []*logging.ExtendedHeader
|
||||
sentHeaders []*logging.ShortHeader
|
||||
receivedHeaders []*logging.ShortHeader
|
||||
)
|
||||
|
||||
func countKeyPhases() (sent, received int) {
|
||||
lastKeyPhase := protocol.KeyPhaseOne
|
||||
for _, hdr := range sentHeaders {
|
||||
if hdr.IsLongHeader {
|
||||
continue
|
||||
}
|
||||
if hdr.KeyPhase != lastKeyPhase {
|
||||
sent++
|
||||
lastKeyPhase = hdr.KeyPhase
|
||||
|
@ -45,7 +42,7 @@ type keyUpdateConnTracer struct {
|
|||
logging.NullConnectionTracer
|
||||
}
|
||||
|
||||
func (t *keyUpdateConnTracer) SentPacket(hdr *logging.ExtendedHeader, size logging.ByteCount, ack *logging.AckFrame, frames []logging.Frame) {
|
||||
func (t *keyUpdateConnTracer) SentShortHeaderPacket(hdr *logging.ShortHeader, _ logging.ByteCount, _ *logging.AckFrame, _ []logging.Frame) {
|
||||
sentHeaders = append(sentHeaders, hdr)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue