forked from quic-go/quic-go
handle ACKs separately in the sent packet handler packet struct
This commit is contained in:
@@ -2,17 +2,6 @@ package ackhandler
|
||||
|
||||
import "github.com/lucas-clemente/quic-go/internal/wire"
|
||||
|
||||
// Returns a new slice with all non-ack-eliciting frames deleted.
|
||||
func stripNonAckElicitingFrames(fs []wire.Frame) []wire.Frame {
|
||||
res := make([]wire.Frame, 0, len(fs))
|
||||
for _, f := range fs {
|
||||
if IsFrameAckEliciting(f) {
|
||||
res = append(res, f)
|
||||
}
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
// IsFrameAckEliciting returns true if the frame is ack-eliciting.
|
||||
func IsFrameAckEliciting(f wire.Frame) bool {
|
||||
switch f.(type) {
|
||||
|
||||
Reference in New Issue
Block a user