handle ACKs separately in the sent packet handler packet struct

This commit is contained in:
Marten Seemann
2019-04-21 20:37:18 +09:00
parent ae685f9d42
commit 5d999f3927
6 changed files with 25 additions and 33 deletions

View File

@@ -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) {