frame.go 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. package logging
  2. import "github.com/Psiphon-Labs/quic-go/internal/wire"
  3. // A Frame is a QUIC frame
  4. type Frame interface{}
  5. // The AckRange is used within the AckFrame.
  6. // It is a range of packet numbers that is being acknowledged.
  7. type AckRange = wire.AckRange
  8. type (
  9. // An AckFrame is an ACK frame.
  10. AckFrame = wire.AckFrame
  11. // A ConnectionCloseFrame is a CONNECTION_CLOSE frame.
  12. ConnectionCloseFrame = wire.ConnectionCloseFrame
  13. // A DataBlockedFrame is a DATA_BLOCKED frame.
  14. DataBlockedFrame = wire.DataBlockedFrame
  15. // A HandshakeDoneFrame is a HANDSHAKE_DONE frame.
  16. HandshakeDoneFrame = wire.HandshakeDoneFrame
  17. // A MaxDataFrame is a MAX_DATA frame.
  18. MaxDataFrame = wire.MaxDataFrame
  19. // A MaxStreamDataFrame is a MAX_STREAM_DATA frame.
  20. MaxStreamDataFrame = wire.MaxStreamDataFrame
  21. // A MaxStreamsFrame is a MAX_STREAMS_FRAME.
  22. MaxStreamsFrame = wire.MaxStreamsFrame
  23. // A NewConnectionIDFrame is a NEW_CONNECTION_ID frame.
  24. NewConnectionIDFrame = wire.NewConnectionIDFrame
  25. // A NewTokenFrame is a NEW_TOKEN frame.
  26. NewTokenFrame = wire.NewTokenFrame
  27. // A PathChallengeFrame is a PATH_CHALLENGE frame.
  28. PathChallengeFrame = wire.PathChallengeFrame
  29. // A PathResponseFrame is a PATH_RESPONSE frame.
  30. PathResponseFrame = wire.PathResponseFrame
  31. // A PingFrame is a PING frame.
  32. PingFrame = wire.PingFrame
  33. // A ResetStreamFrame is a RESET_STREAM frame.
  34. ResetStreamFrame = wire.ResetStreamFrame
  35. // A RetireConnectionIDFrame is a RETIRE_CONNECTION_ID frame.
  36. RetireConnectionIDFrame = wire.RetireConnectionIDFrame
  37. // A StopSendingFrame is a STOP_SENDING frame.
  38. StopSendingFrame = wire.StopSendingFrame
  39. // A StreamsBlockedFrame is a STREAMS_BLOCKED frame.
  40. StreamsBlockedFrame = wire.StreamsBlockedFrame
  41. // A StreamDataBlockedFrame is a STREAM_DATA_BLOCKED frame.
  42. StreamDataBlockedFrame = wire.StreamDataBlockedFrame
  43. )
  44. // A CryptoFrame is a CRYPTO frame.
  45. type CryptoFrame struct {
  46. Offset ByteCount
  47. Length ByteCount
  48. }
  49. // A StreamFrame is a STREAM frame.
  50. type StreamFrame struct {
  51. StreamID StreamID
  52. Offset ByteCount
  53. Length ByteCount
  54. Fin bool
  55. }
  56. // A DatagramFrame is a DATAGRAM frame.
  57. type DatagramFrame struct {
  58. Length ByteCount
  59. }