mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 20:57:36 +03:00
introduce type aliases for internal types in the logging package
This commit is contained in:
parent
d4dc08b208
commit
fea17a671b
2 changed files with 82 additions and 25 deletions
|
@ -2,11 +2,10 @@ package logging
|
|||
|
||||
import (
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"github.com/lucas-clemente/quic-go/internal/wire"
|
||||
)
|
||||
|
||||
// PacketTypeFromHeader determines the packet type from a *wire.Header.
|
||||
func PacketTypeFromHeader(hdr *wire.Header) PacketType {
|
||||
func PacketTypeFromHeader(hdr *Header) PacketType {
|
||||
if !hdr.IsLongHeader {
|
||||
return PacketType1RTT
|
||||
}
|
||||
|
@ -31,13 +30,13 @@ func PacketTypeFromHeader(hdr *wire.Header) PacketType {
|
|||
type PacketHeader struct {
|
||||
PacketType PacketType
|
||||
|
||||
PacketNumber protocol.PacketNumber
|
||||
PayloadLength protocol.ByteCount
|
||||
PacketNumber PacketNumber
|
||||
PayloadLength ByteCount
|
||||
// Size of the QUIC packet (QUIC header + payload).
|
||||
// See https://github.com/quiclog/internet-drafts/issues/40.
|
||||
PacketSize protocol.ByteCount
|
||||
PacketSize ByteCount
|
||||
|
||||
Version protocol.VersionNumber
|
||||
SrcConnectionID protocol.ConnectionID
|
||||
DestConnectionID protocol.ConnectionID
|
||||
Version VersionNumber
|
||||
SrcConnectionID ConnectionID
|
||||
DestConnectionID ConnectionID
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue