IoT::UDP

class IUDPEndpoint

File Information

Library: IoT/UDP
Package: Generated
Header: IoT/UDP/IUDPEndpoint.h

Description

The UDPEndpoint is used to receive and send UDP packets.

Inheritance

Direct Base Classes: Poco::OSP::Service

All Base Classes: Poco::OSP::Service, Poco::RefCountedObject

Known Derived Classes: UDPEndpointRemoteObject

Member Summary

Member Functions: address, isA, remoteAddress, remoting__enableEvents, remoting__typeId, sendPacket, type

Inherited Functions: duplicate, isA, referenceCount, release, type

Types Aliases

Ptr

using Ptr = Poco::AutoPtr < IUDPEndpoint >;

Constructors

IUDPEndpoint

IUDPEndpoint();

Creates a IUDPEndpoint.

Destructor

~IUDPEndpoint virtual

virtual ~IUDPEndpoint();

Destroys the IUDPEndpoint.

Member Functions

address virtual

virtual IoT::UDP::EndpointAddress address() const = 0;

Returns the local address the socket of the endpoint has been bound to.

isA virtual

bool isA(
    const std::type_info & otherType
) const;

Returns true if the class is a subclass of the class given by otherType.

remoteAddress virtual

virtual Poco::Nullable < IoT::UDP::EndpointAddress > remoteAddress() const = 0;

Returns the remote address the socket of the endpoint is "connected" to, or null if the socket is not connected.

If a remote address has been specified in the configuration, packets can only be sent to that address and furthermore, only packets sent from the remote address are accepted.

Note that UDP sockets are not actually connected, the remote address merely acts as the default destination address for sendPacket().

remoting__enableEvents virtual

virtual std::string remoting__enableEvents(
    Poco::RemotingNG::Listener::Ptr pListener,
    bool enable = bool (true)
) = 0;

Enable or disable delivery of remote events.

The given Listener instance must implement the Poco::RemotingNG::EventListener interface, otherwise this method will fail with a RemotingException.

This method is only used with Proxy objects; calling this method on a RemoteObject will do nothing.

remoting__typeId static

static const Poco::RemotingNG::Identifiable::TypeId & remoting__typeId();

Returns the TypeId of the class.

sendPacket virtual

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

Sends the given payload to the given destination address, or to the remote address, if one has been configured.

If the endpoint has been connected to a remote address, the destination address must be omitted.

type virtual

const std::type_info & type() const;

Returns the type information for the object's class.

Variables

packetReceived

Poco::BasicEvent < const IoT::UDP::Packet > packetReceived;

Securely control IoT edge devices from anywhere   Connect a Device