rtp

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package rtp implements the RTP server, a media proxy driven over ng.

Index

Constants

This section is empty.

Variables

View Source
var (
	// MediaTimeout is how long a call lives with no media from either party.
	MediaTimeout = 5 * time.Minute
	// EarlyMediaHold is how long media from an unknown source waits for the answer that names it.
	EarlyMediaHold = 2 * time.Second
	// EarlyMediaBuffer is the number of packets a stream holds per direction for a party it
	// cannot reach yet; older packets give way to newer ones.
	EarlyMediaBuffer = 50
	// MaxUnmatched is the number of media conns from unknown sources that may wait at once.
	MaxUnmatched = 256
)

Functions

func New

New creates the RTP server of a validated config.

Types

type Server

type Server struct {
	server.Base
	// contains filtered or unexported fields
}

Server is an rtp server.

func (*Server) Close

func (s *Server) Close(_ bool) error

Close ends every call and closes the control conns.

func (*Server) GetConfig

func (s *Server) GetConfig() stnrv2.Config

func (*Server) Reconcile

func (s *Server) Reconcile(conf stnrv2.Config) error

Reconcile applies the spec and the public address to the next calls.

func (*Server) Serve

func (s *Server) Serve(c api.Conn) (api.Conn, api.Verdict, error)

Serve takes a control conn from a listener labeled "role: control", and a carrier media conn from any other.

func (*Server) Sessions

func (s *Server) Sessions() int

Sessions returns the number of calls.

func (*Server) Start

func (s *Server) Start() error

Start starts serving with an empty call table.

func (*Server) Status

func (s *Server) Status() stnrv2.Status

Jump to

Keyboard shortcuts

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