Documentation
¶
Index ¶
- func CloseLocalUDPConn(conn *net.UDPConn) error
- func CreateDir(path string) error
- func DeleteDir(path string) error
- func GetFreePortEven() (port int, err error)
- func GetOutputDir() string
- func GetPublicIP() string
- func NewLocalUDPConn(port int) (*net.UDPConn, error)
- func OpenFile(path string) (*os.File, error)
- func WriteRTPPacketToUDPConn(conn *net.UDPConn, rtpPacket *rtp.Packet) error
- func WriteToFile(path, content string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFreePortEven ¶
ref: https://www.ietf.org/rfc/rfc2327.txt#:~:text=For%20RTP%20compliance%20it%20should%20be%20an%20even%0A%20%20%20%20%20number. credits: https://gist.github.com/sevkin/96bdae9274465b2d09191384f86ef39d
func GetPublicIP ¶
func GetPublicIP() string
Get Public IP address. credits: https://github.com/Glimesh/broadcast-box
func NewLocalUDPConn ¶
Dial port for UDP connection and return it.
func WriteRTPPacketToUDPConn ¶
Write RTP packets to UDP connection.
func WriteToFile ¶
Create new file and write the `content` to it.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.