Documentation
¶
Index ¶
Constants ¶
const EventSchema = "urn:ietf:params:qlog:events:roq-01"
EventSchema is the qlog event schema for RTP over QUIC.
Variables ¶
This section is empty.
Functions ¶
func DefaultConnectionTracer ¶
func DefaultConnectionTracer(ctx context.Context, isClient bool, connID quic.ConnectionID) qlogwriter.Trace
DefaultConnectionTracer creates a qlog trace that accepts both QUIC and RoQ events. Set it as quic.Config.Tracer to have a roq Session log its events into the same file as the QUIC transport events. Like quic-go's tracer, it writes to the directory named by the QLOGDIR environment variable and returns nil if QLOGDIR is not set.
Types ¶
type DatagramPacketCreated ¶
type DatagramPacketCreated struct {
Packet Packet
}
DatagramPacketCreated is logged when a packet is sent as a datagram.
func (DatagramPacketCreated) Name ¶
func (e DatagramPacketCreated) Name() string
type DatagramPacketParsed ¶
type DatagramPacketParsed struct {
Packet Packet
}
DatagramPacketParsed is logged when a datagram is received.
func (DatagramPacketParsed) Name ¶
func (e DatagramPacketParsed) Name() string
type Packet ¶
type Packet struct {
FlowID uint64
// Length is the length of the packet as it appears on the wire, including
// the RoQ framing around it: the length prefix on a stream, or the flow ID
// on a datagram.
Length uint64
Raw RawInfo
}
Packet is the RoQ packet an event refers to.
type RawInfo ¶
type RawInfo struct {
// Length is the length of the packet as it appears on the wire, including
// the RoQ framing around it: the length prefix on a stream, or the flow ID
// on a datagram. The flow ID of a stream is sent once, ahead of its first
// packet, and is not counted.
Length uint64
// PayloadLength is the length of the RTP or RTCP packet, without any RoQ
// framing.
PayloadLength uint64
// Data is the packet as it appears on the wire, of Length bytes. It is
// logged as a hex string and omitted when nil, which is what a Session
// does unless it was created with roq.WithQlogPacketData. It may be
// shorter than Length, because the session can be configured to keep only
// the first few bytes of each packet.
Data []byte
}
RawInfo describes the wire image of a packet.
type StreamOpened ¶
StreamOpened is logged when a stream is opened for a flow.
func (StreamOpened) Name ¶
func (e StreamOpened) Name() string
type StreamPacketCreated ¶
StreamPacketCreated is logged when a packet is written to a stream.
func (StreamPacketCreated) Name ¶
func (e StreamPacketCreated) Name() string
type StreamPacketParsed ¶
StreamPacketParsed is logged when a packet is read from a stream.
func (StreamPacketParsed) Name ¶
func (e StreamPacketParsed) Name() string