github.com/psiphon-labs/psiphon-tunnel-core@v2.0.28+incompatible/psiphon/common/quic/gquic-go/internal/ackhandler/packet.go (about)

     1  package ackhandler
     2  
     3  import (
     4  	"time"
     5  
     6  	"github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common/quic/gquic-go/internal/protocol"
     7  	"github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common/quic/gquic-go/internal/wire"
     8  )
     9  
    10  // A Packet is a packet
    11  type Packet struct {
    12  	PacketNumber    protocol.PacketNumber
    13  	PacketType      protocol.PacketType
    14  	Frames          []wire.Frame
    15  	Length          protocol.ByteCount
    16  	EncryptionLevel protocol.EncryptionLevel
    17  	SendTime        time.Time
    18  
    19  	largestAcked protocol.PacketNumber // if the packet contains an ACK, the LargestAcked value of that ACK
    20  
    21  	// There are two reasons why a packet cannot be retransmitted:
    22  	// * it was already retransmitted
    23  	// * this packet is a retransmission, and we already received an ACK for the original packet
    24  	canBeRetransmitted      bool
    25  	includedInBytesInFlight bool
    26  	retransmittedAs         []protocol.PacketNumber
    27  	isRetransmission        bool // we need a separate bool here because 0 is a valid packet number
    28  	retransmissionOf        protocol.PacketNumber
    29  }