dc

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2025 License: AGPL-3.0, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeMessage

func EncodeMessage(mt MessageType, payload any) ([]byte, error)

Types

type MessageSDP

type MessageSDP []byte // payload is zlib compressed data of a JSON serialized webrtc.SessionDescription

Supported payloads

type MessageType

type MessageType uint8
const (
	MessageTypePing          MessageType = iota + 1 // no payload
	MessageTypePong                                 // no payload
	MessageTypeSDP                                  // MessageSDP
	MessageTypeLossRate                             // float64
	MessageTypeRoundTripTime                        // float64
	MessageTypeJitter                               // float64
)

func DecodeMessage

func DecodeMessage(msg []byte) (MessageType, any, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL