Documentation ¶
Overview ¶
Package stdnet is an extension of the pion's stdnet. With it the list of the interface can come from external source. More info: https://github.com/golang/go/issues/40569
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IFaceDiscover ¶
type IFaceDiscover interface { // IFaces return with the description of the interfaces IFaces() (string, error) }
IFaceDiscover provide an option for external services (mobile) to collect network interface information
type Net ¶
Net is an implementation of the net.Net interface based on functions of the standard net package.
func NewNet ¶
func NewNet(iFaceDiscover IFaceDiscover) (*Net, error)
NewNet creates a new StdNet instance.
func (*Net) InterfaceByIndex ¶
InterfaceByIndex returns the interface specified by index.
On Solaris, it returns one of the logical network interfaces sharing the logical data link; for more precision use InterfaceByName.
func (*Net) InterfaceByName ¶
InterfaceByName returns the interface specified by name.
func (*Net) Interfaces ¶
Interfaces returns a slice of interfaces which are available on the system
func (*Net) UpdateInterfaces ¶
func (n *Net) UpdateInterfaces(iFaceDiscover IFaceDiscover) error
UpdateInterfaces updates the internal list of network interfaces and associated addresses.