packet.go 1006 B

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