rtc

package
v0.0.0-...-64b69da Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	//CleanChannel return the dead pub's mid
	CleanChannel = make(chan string, maxCleanSize)
)

Functions

func Close

func Close()

Close close all Router

func DelRouter

func DelRouter(id string)

DelRouter delete pub

func Init

func Init(port int, ices []string, icePortStart, icePortEnd uint16, kcpKey, kcpSalt string) error

Init port and ice urls

func MapRouter

func MapRouter(fn func(id string, r *Router))

Types

type Router

type Router struct {
	// contains filtered or unexported fields
}

Router is rtp router

func AddRouter

func AddRouter(id string) *Router

AddRouter add a new router

func GetOrNewRouter

func GetOrNewRouter(id string) *Router

GetOrNewRouter get router from map

func GetRouter

func GetRouter(id string) *Router

GetRouter get router from map

func NewRouter

func NewRouter(id string) *Router

NewRouter return a new Router

func (*Router) AddPlugin

func (r *Router) AddPlugin(id string, i plugins.Plugin)

AddPlugin add a plugin

func (*Router) AddPub

AddPub add a pub transport

func (*Router) AddSub

AddSub add a pub to router

func (*Router) Alive

func (r *Router) Alive() bool

Alive return router status

func (*Router) Close

func (r *Router) Close()

Close release all

func (*Router) DelPlugin

func (r *Router) DelPlugin(id string)

DelPlugin del plugin

func (*Router) DelPlugins

func (r *Router) DelPlugins()

DelPlugins del all plugins

func (*Router) DelPub

func (r *Router) DelPub()

DelPub del pub

func (*Router) DelSub

func (r *Router) DelSub(id string)

DelSub del sub by id

func (*Router) DelSubs

func (r *Router) DelSubs()

DelSubs del all sub

func (*Router) GetPlugin

func (r *Router) GetPlugin(id string) plugins.Plugin

GetPlugin get plugin by id

func (*Router) GetPub

func (r *Router) GetPub() transport.Transport

GetPub get pub

func (*Router) GetSub

func (r *Router) GetSub(id string) transport.Transport

GetSub get a sub by id

func (*Router) GetSubs

func (r *Router) GetSubs() map[string]transport.Transport

GetSubs get all subs

func (*Router) HasNoneSub

func (r *Router) HasNoneSub() bool

HasNoneSub check if sub == 0

func (*Router) PushRTCP

func (r *Router) PushRTCP(pkt rtcp.Packet) error

PushRTCP push rtcp to jitterbuffer

Directories

Path Synopsis
deadline
Package deadline provides deadline timer used to implement net.Conn compatible connection
Package deadline provides deadline timer used to implement net.Conn compatible connection
udp
Package udp provides a connection-oriented listener over a UDP PacketConn
Package udp provides a connection-oriented listener over a UDP PacketConn

Jump to

Keyboard shortcuts

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