rtp

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 18 Imported by: 0

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
⌂ 换网址