IoT::NetworkEnvironment

class NetworkEnvironmentService

File Information

Library: IoT/NetworkEnvironment
Package: NetworkEnvironment
Header: IoT/NetworkEnvironment/NetworkEnvironmentService.h

Description

The NetworkEnvironmentService can be used to get notifications about network address and network interface changes.

Inheritance

Known Derived Classes: NetworkEnvironmentServiceImpl

Member Summary

Member Functions: enumerateInterfaces, findActiveNetworkInterface

Types Aliases

Ptr

using Ptr = Poco::SharedPtr < NetworkEnvironmentService >;

Constructors

NetworkEnvironmentService

NetworkEnvironmentService();

Destructor

~NetworkEnvironmentService virtual

virtual ~NetworkEnvironmentService();

Member Functions

enumerateInterfaces virtual

virtual std::vector < NetworkInterface > enumerateInterfaces(
    int options = 0
) = 0;

Returns a vector containing available network interfaces. The options parameter can be used to include non-IP interfaces or interfaces that are down.

findActiveNetworkInterface virtual

virtual std::string findActiveNetworkInterface(
    IPVersion ipVersion
) = 0;

Finds and returns the name of the first active network interface that supports the given IP protocol version.

Throws a Poco::NotFoundException if no suitable network interface is found.

Variables

networkEnvironmentChanged

Poco::BasicEvent < const ChangeType > networkEnvironmentChanged;

A change in the network environment has been detected.

Securely control IoT edge devices from anywhere   Connect a Device