MCPcopy Create free account
hub / github.com/pion/ice / InterfaceByIndex

Method InterfaceByIndex

gather_test.go:1316–1328  ·  view source on GitHub ↗
(index int)

Source from the content-addressed store, hash-verified

1314}
1315
1316func (n *errorTurnNet) InterfaceByIndex(index int) (*transport.Interface, error) {
1317 ifaces, err := n.Interfaces()
1318 if err != nil {
1319 return nil, err
1320 }
1321 for _, iface := range ifaces {
1322 if iface.Index == index {
1323 return iface, nil
1324 }
1325 }
1326
1327 return nil, transport.ErrInterfaceNotFound
1328}
1329
1330func (n *errorTurnNet) InterfaceByName(name string) (*transport.Interface, error) {
1331 ifaces, err := n.Interfaces()

Callers

nothing calls this directly

Calls 1

InterfacesMethod · 0.95

Tested by

no test coverage detected