github.com/apernet/quic-go@v0.43.1-0.20240515053213-5e9e635fd9f0/internal/ackhandler/ack_eliciting.go (about) 1 package ackhandler 2 3 import "github.com/apernet/quic-go/internal/wire" 4 5 // IsFrameAckEliciting returns true if the frame is ack-eliciting. 6 func IsFrameAckEliciting(f wire.Frame) bool { 7 _, isAck := f.(*wire.AckFrame) 8 _, isConnectionClose := f.(*wire.ConnectionCloseFrame) 9 return !isAck && !isConnectionClose 10 } 11 12 // HasAckElicitingFrames returns true if at least one frame is ack-eliciting. 13 func HasAckElicitingFrames(fs []Frame) bool { 14 for _, f := range fs { 15 if IsFrameAckEliciting(f.Frame) { 16 return true 17 } 18 } 19 return false 20 }