webrtc

package
v1.21.4 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 43 Imported by: 0

Documentation

Overview

Package webrtc contains a WebRTC server.

Index

Constants

This section is empty.

Variables

View Source
var ErrSessionNotFound = errors.New("session not found")

ErrSessionNotFound is returned when a session is not found.

Functions

This section is empty.

Types

type Server

type Server struct {
	Address                      string
	DumpPackets                  bool
	Encryption                   bool
	ServerKey                    string
	ServerCert                   string
	AllowOrigins                 []string
	TrustedProxies               conf.IPNetworks
	ReadTimeout                  conf.Duration
	WriteTimeout                 conf.Duration
	UDPReadBufferSize            uint
	UDPWriteBufferSize           uint
	LocalUDPAddress              string
	LocalTCPAddress              string
	SupportsIPv6                 bool
	UDPMaxPayloadSize            int
	IPsFromInterfaces            bool
	IPsFromInterfacesList        []string
	IPsFromInterfacesExcludeList []string
	AdditionalHosts              []string
	ICEServers                   []conf.WebRTCICEServer
	STUNGatherTimeout            conf.Duration
	HandshakeTimeout             conf.Duration
	TrackGatherTimeout           conf.Duration
	ExternalCmdPool              *externalcmd.Pool
	Metrics                      serverMetrics
	PathManager                  serverPathManager
	Parent                       serverParent
	// contains filtered or unexported fields
}

Server is a WebRTC server.

func (*Server) APISessionsGet

func (s *Server) APISessionsGet(uuid uuid.UUID) (*defs.APIWebRTCSession, error)

APISessionsGet implements defs.APIWebRTCServer.

func (*Server) APISessionsKick

func (s *Server) APISessionsKick(uuid uuid.UUID) error

APISessionsKick implements defs.APIWebRTCServer.

func (*Server) APISessionsList

func (s *Server) APISessionsList() (*defs.APIWebRTCSessionList, error)

APISessionsList implements defs.APIWebRTCServer.

func (*Server) Close

func (s *Server) Close()

Close closes the server.

func (*Server) Initialize

func (s *Server) Initialize() error

Initialize initializes the server.

func (*Server) Log

func (s *Server) Log(level logger.Level, format string, args ...any)

Log implements logger.Writer.

Jump to

Keyboard shortcuts

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