proxies

package
v0.0.0-...-c8b15d8 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2018 License: MIT Imports: 16 Imported by: 3

Documentation

Index

Constants

View Source
const (
	OnErrorClose = UdpProxyErrorBehavior(iota)
	OnErrorContinue
	OnErrorRetry
	OnErrorPause // PauseWrite immediately on error. After ResumeWrite retry last packet.
)

Variables

View Source
var (
	BufferedPackets  uint = 128
	ProxyPairMinPort int  = 20000
	ProxyPairMaxPort int  = 50000
)

Functions

func NewUdpProxyPair

func NewUdpProxyPair(listenHost, target1, target2 string) (proxy1 *UdpProxy, proxy2 *UdpProxy, err error)

func UdpProxyFlags

func UdpProxyFlags()

Types

type AmpProxy

type AmpProxy struct {
	*protocols.Server

	StreamStartedCallback func(rtsp *golib.Command, proxies []*UdpProxy)
	StreamStoppedCallback func(rtsp *golib.Command, proxies []*UdpProxy)
	// contains filtered or unexported fields
}

func RegisterAmpProxy

func RegisterAmpProxy(server *protocols.Server, rtspURL, localProxyIP string) (*AmpProxy, error)

ampAddr: address to listen on for AMP requests rtspURL: base URL used when sending RTSP requests to the backend media server localProxyIP: address to receive RTP/RTCP packets from the media server

func (*AmpProxy) PauseStream

func (proxy *AmpProxy) PauseStream(val *amp_control.PauseStream) error

func (*AmpProxy) RedirectStream

func (proxy *AmpProxy) RedirectStream(desc *amp_control.RedirectStream) error

func (*AmpProxy) ResumeStream

func (proxy *AmpProxy) ResumeStream(val *amp_control.ResumeStream) error

func (*AmpProxy) StartStream

func (proxy *AmpProxy) StartStream(desc *amp.StartStream) error

func (*AmpProxy) StopServer

func (proxy *AmpProxy) StopServer()

func (*AmpProxy) StopStream

func (proxy *AmpProxy) StopStream(desc *amp.StopStream) error

type PcpProxy

type PcpProxy struct {
	*protocols.Server

	ProxyStartedCallback func(proxy *UdpProxy)
	ProxyStoppedCallback func(proxy *UdpProxy)
	// contains filtered or unexported fields
}

func RegisterPcpProxy

func RegisterPcpProxy(server *protocols.Server) (*PcpProxy, error)

func (*PcpProxy) StartProxy

func (proxy *PcpProxy) StartProxy(desc *pcp.StartProxy) error

func (*PcpProxy) StartProxyPair

func (proxy *PcpProxy) StartProxyPair(val *pcp.StartProxyPair) (*pcp.StartProxyPairResponse, error)

func (*PcpProxy) StopProxy

func (proxy *PcpProxy) StopProxy(desc *pcp.StopProxy) error

func (*PcpProxy) StopProxyPair

func (proxy *PcpProxy) StopProxyPair(val *pcp.StopProxyPair) error

func (*PcpProxy) StopServer

func (proxy *PcpProxy) StopServer()

type UdpProxy

type UdpProxy struct {
	OnError UdpProxyErrorBehavior

	CloseOnError bool
	Closed       bool
	Err          error
	Stats        *stats.Stats
	// contains filtered or unexported fields
}

func NewUdpProxy

func NewUdpProxy(listenAddr, targetAddr string) (*UdpProxy, error)

func (*UdpProxy) PauseWrite

func (proxy *UdpProxy) PauseWrite()

func (*UdpProxy) RedirectOutput

func (proxy *UdpProxy) RedirectOutput(newTargetAddr string) error

func (*UdpProxy) ResumeWrite

func (proxy *UdpProxy) ResumeWrite()

func (*UdpProxy) Start

func (proxy *UdpProxy) Start(wg *sync.WaitGroup) golib.StopChan

func (*UdpProxy) Stop

func (proxy *UdpProxy) Stop()

func (*UdpProxy) String

func (proxy *UdpProxy) String() string

func (*UdpProxy) WriteErrors

func (proxy *UdpProxy) WriteErrors() <-chan error

type UdpProxyErrorBehavior

type UdpProxyErrorBehavior int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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