github.com/sagernet/quic-go@v0.43.1-beta.1/internal/ackhandler/frame.go (about)

     1  package ackhandler
     2  
     3  import (
     4  	"github.com/sagernet/quic-go/internal/wire"
     5  )
     6  
     7  // FrameHandler handles the acknowledgement and the loss of a frame.
     8  type FrameHandler interface {
     9  	OnAcked(wire.Frame)
    10  	OnLost(wire.Frame)
    11  }
    12  
    13  type Frame struct {
    14  	Frame   wire.Frame // nil if the frame has already been acknowledged in another packet
    15  	Handler FrameHandler
    16  }
    17  
    18  type StreamFrame struct {
    19  	Frame   *wire.StreamFrame
    20  	Handler FrameHandler
    21  }