IoT::UDP

class UDPEndpoint

Library: IoT/UDP
Package: UDPEndpoint
Header: IoT/UDP/UDPEndpoint.h

Description

The UDPEndpoint is used to receive and send UDP packets.

Inheritance

Known Derived Classes: UDPEndpointImpl

Member Summary

Member Functions: address, sendPacket

Types Aliases

Ptr

using Ptr = Poco::SharedPtr < UDPEndpoint >;

Constructors

UDPEndpoint

UDPEndpoint();

Creates the UDPEndpoint.

Destructor

~UDPEndpoint virtual

virtual ~UDPEndpoint();

Destroys the UDPEndpoint.

Member Functions

address virtual

virtual EndpointAddress address() const = 0;

Returns the socket address of this endpoint.

sendPacket virtual

virtual void sendPacket(
    const std::vector < char > & payload,
    const EndpointAddress & destination = EndpointAddress ()
) = 0;

Sends the given payload to the given destination address.

If the endpoint is connected to a default destination address, the destination address can be omitted.

Variables

packetReceived

Poco::BasicEvent < const Packet > packetReceived;

Fired when an UDP packet has been received.

Securely control IoT edge devices from anywhere   Connect a Device