Documentation ¶
Index ¶
- func CreateUDPMuxesFromPorts(ports []int, opts ...UDPMuxFromPortOption) ([]ice.UDPMux, error)
- type MultiPortsUDPMux
- type UDPMuxFromPortOption
- func UDPMuxFromPortWithBatchWrite(batchWriteSize int, batchWriteInterval time.Duration) UDPMuxFromPortOption
- func UDPMuxFromPortWithIPFilter(f func(ip net.IP) bool) UDPMuxFromPortOption
- func UDPMuxFromPortWithInterfaceFilter(f func(string) bool) UDPMuxFromPortOption
- func UDPMuxFromPortWithLogger(logger logging.LeveledLogger) UDPMuxFromPortOption
- func UDPMuxFromPortWithLoopback() UDPMuxFromPortOption
- func UDPMuxFromPortWithNet(n transport.Net) UDPMuxFromPortOption
- func UDPMuxFromPortWithNetworks(networks ...ice.NetworkType) UDPMuxFromPortOption
- func UDPMuxFromPortWithReadBufferSize(size int) UDPMuxFromPortOption
- func UDPMuxFromPortWithWriteBufferSize(size int) UDPMuxFromPortOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateUDPMuxesFromPorts ¶
func CreateUDPMuxesFromPorts(ports []int, opts ...UDPMuxFromPortOption) ([]ice.UDPMux, error)
CreateUDPMuxesFromPorts creates an slice of UDPMuxes that listens to all interfaces on the provided ports.
Types ¶
type MultiPortsUDPMux ¶
type MultiPortsUDPMux struct { *ice.MultiUDPMuxDefault // contains filtered or unexported fields }
func NewMultiPortsUDPMux ¶
func NewMultiPortsUDPMux(muxes ...ice.UDPMux) *MultiPortsUDPMux
NewMultiUDPMuxDefault creates an instance of MultiUDPMuxDefault that uses the provided UDPMux instances.
func (*MultiPortsUDPMux) GetListenAddresses ¶
func (m *MultiPortsUDPMux) GetListenAddresses() []net.Addr
GetListenAddresses returns the list of addresses that this mux is listening on, if there are multiple muxes listening to different ports of the same IP addr, it will return one mux of them in round robin fashion.
type UDPMuxFromPortOption ¶
type UDPMuxFromPortOption interface {
// contains filtered or unexported methods
}
UDPMuxFromPortOption provide options for NewMultiUDPMuxFromPort
func UDPMuxFromPortWithBatchWrite ¶
func UDPMuxFromPortWithBatchWrite(batchWriteSize int, batchWriteInterval time.Duration) UDPMuxFromPortOption
UDPMuxFromPortWithBatchWrite enable batch write for UDPMux
func UDPMuxFromPortWithIPFilter ¶
func UDPMuxFromPortWithIPFilter(f func(ip net.IP) bool) UDPMuxFromPortOption
UDPMuxFromPortWithIPFilter set the filter to filter out IP addresses that should not be used
func UDPMuxFromPortWithInterfaceFilter ¶
func UDPMuxFromPortWithInterfaceFilter(f func(string) bool) UDPMuxFromPortOption
UDPMuxFromPortWithInterfaceFilter set the filter to filter out interfaces that should not be used
func UDPMuxFromPortWithLogger ¶
func UDPMuxFromPortWithLogger(logger logging.LeveledLogger) UDPMuxFromPortOption
UDPMuxFromPortWithLogger set the logger for the created UDPMux
func UDPMuxFromPortWithLoopback ¶
func UDPMuxFromPortWithLoopback() UDPMuxFromPortOption
UDPMuxFromPortWithLoopback set loopback interface should be included
func UDPMuxFromPortWithNet ¶
func UDPMuxFromPortWithNet(n transport.Net) UDPMuxFromPortOption
UDPMuxFromPortWithNet sets the network transport to use.
func UDPMuxFromPortWithNetworks ¶
func UDPMuxFromPortWithNetworks(networks ...ice.NetworkType) UDPMuxFromPortOption
UDPMuxFromPortWithNetworks set the networks that should be used. default is both IPv4 and IPv6
func UDPMuxFromPortWithReadBufferSize ¶
func UDPMuxFromPortWithReadBufferSize(size int) UDPMuxFromPortOption
UDPMuxFromPortWithReadBufferSize set the UDP connection read buffer size
func UDPMuxFromPortWithWriteBufferSize ¶
func UDPMuxFromPortWithWriteBufferSize(size int) UDPMuxFromPortOption
UDPMuxFromPortWithWriteBufferSize set the UDP connection write buffer size