utils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeSDP

func DecodeSDP(in string) (webrtc.SessionDescription, error)

DecodeSDP reverses EncodeSDP.

func EncodeSDP

func EncodeSDP(desc webrtc.SessionDescription) (string, error)

EncodeSDP serialises desc as JSON, zstd-compresses it, and base45-encodes the result.

func ParseSTUN

func ParseSTUN(stunAddr string) error

ParseSTUN validates a STUN address of the form "host:port"

func ResolveSDPFlag

func ResolveSDPFlag(value string, stdin io.Reader) (string, error)

ResolveSDPFlag returns the encoded SDP string referenced by value, validates it via DecodeSDP, and returns a descriptive error when the supplied value is unusable. value must be non-empty; callers are responsible for the "unset" branch.

A leading '@' switches to file mode: @- reads stdin, @<path> reads a file. Otherwise the value is treated as a literal encoded SDP.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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