IoT::UDP

class UDPEndpointImpl

File Information

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

Description

The default implementation of UDPEndpoint

Inheritance

Direct Base Classes: UDPEndpoint

All Base Classes: UDPEndpoint

Member Summary

Member Functions: address, connect, handlePackets, remoteAddress, sendPacket, socket

Inherited Functions: address, remoteAddress, sendPacket

Types Aliases

Ptr

using Ptr = Poco::SharedPtr < UDPEndpointImpl >;

Enumerations

Anonymous protected

MAX_MESSAGE_SIZE = 4096

POLL_TIMEOUT = 200000

Constructors

UDPEndpointImpl

UDPEndpointImpl(
    const Poco::Net::SocketAddress & addr
);

Creates the UDPEndpointImpl using the given local socket address.

The endpoint's socket is bound to the given address.

Destructor

~UDPEndpointImpl virtual

~UDPEndpointImpl();

Destroys the UDPEndpointImpl.

Member Functions

address virtual

EndpointAddress address() const;

connect

void connect(
    const Poco::Net::SocketAddress & addr
);

Connects the socket to the given address.

remoteAddress virtual

Poco::Nullable < EndpointAddress > remoteAddress() const;

sendPacket virtual

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

socket inline

const Poco::Net::DatagramSocket & socket() const;

Returns the underlying socket.

socket

Poco::Net::DatagramSocket & socket();

Returns the underlying socket.

handlePackets protected

void handlePackets();

Securely control IoT edge devices from anywhere   Connect a Device