Documentation ¶
Index ¶
- type ITransport
- type ModTransportOption
- type TcpActiveTransport
- func (c *TcpActiveTransport) Close()
- func (c *TcpActiveTransport) GetRemoteAddr() (remoteHost string, remoteRtpPort, remoteRtcpPort int)
- func (c *TcpActiveTransport) GetRemoteRtcpAddr() (remoteHost string, remotePort int)
- func (c *TcpActiveTransport) LocalHost() string
- func (c *TcpActiveTransport) LocalRtcpPort() int
- func (c *TcpActiveTransport) LocalRtpPort() int
- func (c *TcpActiveTransport) OnRtcp(onRtcp func(buf []byte, rAddr net.Addr))
- func (c *TcpActiveTransport) OnRtpData(onRtpData func(buf []byte, rAddr net.Addr))
- func (c *TcpActiveTransport) OnRtpPacket(onRtpPacket func(pkt *rtprtcp.RTPPacket, rAddr net.Addr))
- func (c *TcpActiveTransport) SendData(data []byte) (int, error)
- func (c *TcpActiveTransport) SendRtcp(buf []byte) (int, error)
- func (c *TcpActiveTransport) SendRtp(pkt *rtprtcp.RTPPacket) (int, error)
- func (c *TcpActiveTransport) SetRemoteAddr(remoteHost string, remoteRtpPort, remoteRtcpPort int)
- type TcpPassiveTransport
- func (s *TcpPassiveTransport) Close()
- func (s *TcpPassiveTransport) GetRemoteAddr() (remoteHost string, remoteRtpPort, remoteRtcpPort int)
- func (s *TcpPassiveTransport) GetRemoteRtcpAddr() (remoteHost string, remotePort int)
- func (s *TcpPassiveTransport) LocalHost() string
- func (s *TcpPassiveTransport) LocalRtcpPort() int
- func (s *TcpPassiveTransport) LocalRtpPort() int
- func (s *TcpPassiveTransport) OnRtcp(onRtcp func(buf []byte, rAddr net.Addr))
- func (s *TcpPassiveTransport) OnRtpData(onRtpData func(buf []byte, rAddr net.Addr))
- func (s *TcpPassiveTransport) OnRtpPacket(onRtpPacket func(pkt *rtprtcp.RTPPacket, rAddr net.Addr))
- func (s *TcpPassiveTransport) SendData(data []byte) (int, error)
- func (s *TcpPassiveTransport) SendRtcp(buf []byte) (int, error)
- func (s *TcpPassiveTransport) SendRtp(pkt *rtprtcp.RTPPacket) (int, error)
- func (s *TcpPassiveTransport) SetRemoteAddr(remoteHost string, remoteRtpPort, remoteRtcpPort int)
- type TransportOption
- type UdpTransport
- func (s *UdpTransport) Close()
- func (s *UdpTransport) GetRemoteAddr() (remoteHost string, remoteRtpPort, remoteRtcpPort int)
- func (s *UdpTransport) GetRemoteRtcpAddr() (remoteHost string, remotePort int)
- func (s *UdpTransport) LocalHost() string
- func (s *UdpTransport) LocalRtcpPort() int
- func (s *UdpTransport) LocalRtpPort() int
- func (s *UdpTransport) OnRtcp(onRtcp func(buf []byte, rAddr net.Addr))
- func (s *UdpTransport) OnRtpData(onRtpData func(buf []byte, rAddr net.Addr))
- func (s *UdpTransport) OnRtpPacket(onRtpPacket func(pkt *rtprtcp.RTPPacket, rAddr net.Addr))
- func (s *UdpTransport) SendData(data []byte) (int, error)
- func (s *UdpTransport) SendRtcp(buf []byte) (int, error)
- func (s *UdpTransport) SendRtp(pkt *rtprtcp.RTPPacket) (int, error)
- func (s *UdpTransport) SetRemoteAddr(remoteHost string, remoteRtpPort, remoteRtcpPort int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ITransport ¶
type ITransport interface { SetRemoteAddr(remoteHost string, remoteRtpPort, remoteRtcpPort int) GetRemoteRtcpAddr() (remoteHost string, remotePort int) OnRtpPacket(onRtpPacket func(pkt *rtprtcp.RTPPacket, rAddr net.Addr)) OnRtpData(onRtpData func(buf []byte, rAddr net.Addr)) OnRtcp(onRtcp func(buf []byte, rAddr net.Addr)) SendRtp(pkt *rtprtcp.RTPPacket) (int, error) SendData(data []byte) (int, error) SendRtcp(buf []byte) (int, error) LocalHost() string LocalRtpPort() int LocalRtcpPort() int Close() }
func NewTransport ¶
func NewTransport(rtpOverTcp bool, setupActive bool, option ...ModTransportOption) ITransport
type ModTransportOption ¶
type ModTransportOption func(option *TransportOption)
type TcpActiveTransport ¶
type TcpActiveTransport struct {
// contains filtered or unexported fields
}
func (*TcpActiveTransport) Close ¶
func (c *TcpActiveTransport) Close()
func (*TcpActiveTransport) GetRemoteAddr ¶
func (c *TcpActiveTransport) GetRemoteAddr() (remoteHost string, remoteRtpPort, remoteRtcpPort int)
func (*TcpActiveTransport) GetRemoteRtcpAddr ¶
func (c *TcpActiveTransport) GetRemoteRtcpAddr() (remoteHost string, remotePort int)
func (*TcpActiveTransport) LocalHost ¶
func (c *TcpActiveTransport) LocalHost() string
func (*TcpActiveTransport) LocalRtcpPort ¶
func (c *TcpActiveTransport) LocalRtcpPort() int
func (*TcpActiveTransport) LocalRtpPort ¶
func (c *TcpActiveTransport) LocalRtpPort() int
func (*TcpActiveTransport) OnRtcp ¶
func (c *TcpActiveTransport) OnRtcp(onRtcp func(buf []byte, rAddr net.Addr))
func (*TcpActiveTransport) OnRtpData ¶
func (c *TcpActiveTransport) OnRtpData(onRtpData func(buf []byte, rAddr net.Addr))
func (*TcpActiveTransport) OnRtpPacket ¶
func (c *TcpActiveTransport) OnRtpPacket(onRtpPacket func(pkt *rtprtcp.RTPPacket, rAddr net.Addr))
func (*TcpActiveTransport) SendData ¶
func (c *TcpActiveTransport) SendData(data []byte) (int, error)
func (*TcpActiveTransport) SendRtcp ¶
func (c *TcpActiveTransport) SendRtcp(buf []byte) (int, error)
func (*TcpActiveTransport) SendRtp ¶
func (c *TcpActiveTransport) SendRtp(pkt *rtprtcp.RTPPacket) (int, error)
func (*TcpActiveTransport) SetRemoteAddr ¶
func (c *TcpActiveTransport) SetRemoteAddr(remoteHost string, remoteRtpPort, remoteRtcpPort int)
type TcpPassiveTransport ¶
type TcpPassiveTransport struct {
// contains filtered or unexported fields
}
func (*TcpPassiveTransport) Close ¶
func (s *TcpPassiveTransport) Close()
func (*TcpPassiveTransport) GetRemoteAddr ¶
func (s *TcpPassiveTransport) GetRemoteAddr() (remoteHost string, remoteRtpPort, remoteRtcpPort int)
func (*TcpPassiveTransport) GetRemoteRtcpAddr ¶
func (s *TcpPassiveTransport) GetRemoteRtcpAddr() (remoteHost string, remotePort int)
func (*TcpPassiveTransport) LocalHost ¶
func (s *TcpPassiveTransport) LocalHost() string
func (*TcpPassiveTransport) LocalRtcpPort ¶
func (s *TcpPassiveTransport) LocalRtcpPort() int
func (*TcpPassiveTransport) LocalRtpPort ¶
func (s *TcpPassiveTransport) LocalRtpPort() int
func (*TcpPassiveTransport) OnRtcp ¶
func (s *TcpPassiveTransport) OnRtcp(onRtcp func(buf []byte, rAddr net.Addr))
func (*TcpPassiveTransport) OnRtpData ¶
func (s *TcpPassiveTransport) OnRtpData(onRtpData func(buf []byte, rAddr net.Addr))
func (*TcpPassiveTransport) OnRtpPacket ¶
func (s *TcpPassiveTransport) OnRtpPacket(onRtpPacket func(pkt *rtprtcp.RTPPacket, rAddr net.Addr))
func (*TcpPassiveTransport) SendData ¶
func (s *TcpPassiveTransport) SendData(data []byte) (int, error)
func (*TcpPassiveTransport) SendRtcp ¶
func (s *TcpPassiveTransport) SendRtcp(buf []byte) (int, error)
func (*TcpPassiveTransport) SendRtp ¶
func (s *TcpPassiveTransport) SendRtp(pkt *rtprtcp.RTPPacket) (int, error)
func (*TcpPassiveTransport) SetRemoteAddr ¶
func (s *TcpPassiveTransport) SetRemoteAddr(remoteHost string, remoteRtpPort, remoteRtcpPort int)
type TransportOption ¶
type UdpTransport ¶
type UdpTransport struct {
// contains filtered or unexported fields
}
func (*UdpTransport) Close ¶
func (s *UdpTransport) Close()
func (*UdpTransport) GetRemoteAddr ¶
func (s *UdpTransport) GetRemoteAddr() (remoteHost string, remoteRtpPort, remoteRtcpPort int)
func (*UdpTransport) GetRemoteRtcpAddr ¶
func (s *UdpTransport) GetRemoteRtcpAddr() (remoteHost string, remotePort int)
func (*UdpTransport) LocalHost ¶
func (s *UdpTransport) LocalHost() string
func (*UdpTransport) LocalRtcpPort ¶
func (s *UdpTransport) LocalRtcpPort() int
func (*UdpTransport) LocalRtpPort ¶
func (s *UdpTransport) LocalRtpPort() int
func (*UdpTransport) OnRtcp ¶
func (s *UdpTransport) OnRtcp(onRtcp func(buf []byte, rAddr net.Addr))
func (*UdpTransport) OnRtpData ¶
func (s *UdpTransport) OnRtpData(onRtpData func(buf []byte, rAddr net.Addr))
func (*UdpTransport) OnRtpPacket ¶
func (s *UdpTransport) OnRtpPacket(onRtpPacket func(pkt *rtprtcp.RTPPacket, rAddr net.Addr))
func (*UdpTransport) SetRemoteAddr ¶
func (s *UdpTransport) SetRemoteAddr(remoteHost string, remoteRtpPort, remoteRtcpPort int)
Click to show internal directories.
Click to hide internal directories.