rtc

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 12, 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 CheckPlugins added in v0.2.0

func CheckPlugins(config plugins.Config) error

CheckPlugins plugins config

func Close

func Close()

Close close all Router

func DelRouter added in v0.2.0

func DelRouter(id string)

DelRouter delete pub

func InitIce added in v0.2.0

func InitIce(iceServers []webrtc.ICEServer, icePortStart, icePortEnd uint16) error

InitIce ice urls

func InitPlugins added in v0.2.0

func InitPlugins(config plugins.Config)

InitPlugins plugins config

func InitRTP added in v0.2.0

func InitRTP(port int, kcpKey, kcpSalt string) error

InitRTP rtp port

func MapRouter added in v0.2.0

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

Types

type Router added in v0.2.0

type Router struct {
	// contains filtered or unexported fields
}
+--->sub
|

pub--->pubCh-->pluginChain-->subCh---+--->sub

|
+--->sub

Router is rtp router

func AddRouter added in v0.2.0

func AddRouter(id string) *Router

AddRouter add a new router

func GetOrNewRouter added in v0.2.0

func GetOrNewRouter(id string) *Router

func GetRouter added in v0.2.0

func GetRouter(id string) *Router

GetRouter get router from map

func NewRouter added in v0.2.0

func NewRouter(id string) *Router

NewRouter return a new Router

func (*Router) AddPub added in v0.2.0

AddPub add a pub transport

func (*Router) AddSub added in v0.2.0

AddSub add a pub to router

func (*Router) Alive added in v0.2.0

func (r *Router) Alive() bool

Alive return router status

func (*Router) Close added in v0.2.0

func (r *Router) Close()

Close release all

func (*Router) DelPub added in v0.2.0

func (r *Router) DelPub()

DelPub del pub

func (*Router) DelSub added in v0.2.0

func (r *Router) DelSub(id string)

DelSub del sub by id

func (*Router) DelSubs added in v0.2.0

func (r *Router) DelSubs()

DelSubs del all sub

func (*Router) GetPub added in v0.2.0

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

GetPub get pub

func (*Router) GetSub added in v0.2.0

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

GetSub get a sub by id

func (*Router) GetSubs added in v0.2.0

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

GetSubs get all subs

func (*Router) HasNoneSub added in v0.2.0

func (r *Router) HasNoneSub() bool

HasNoneSub check if sub == 0

func (*Router) InitPlugins added in v0.2.0

func (r *Router) InitPlugins(config plugins.Config) error

func (*Router) ReSendRTP added in v0.2.0

func (r *Router) ReSendRTP(sid string, ssrc uint32, sn uint16) bool

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