IoT::UDP

class UDPEndpointRemoteObject

File Information

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

Description

The UDPEndpoint is used to receive and send UDP packets.

Inheritance

Direct Base Classes: IUDPEndpoint, Poco::RemotingNG::RemoteObject

All Base Classes: IUDPEndpoint, Poco::OSP::Service, Poco::RefCountedObject, Poco::RemotingNG::Identifiable, Poco::RemotingNG::RemoteObject

Member Summary

Member Functions: address, event__packetReceived, remoteAddress, remoting__enableEvents, remoting__enableRemoteEvents, remoting__hasEvents, remoting__typeId, sendPacket

Inherited Functions: address, duplicate, isA, mutex, referenceCount, release, remoteAddress, remoting__enableEvents, remoting__enableRemoteEvents, remoting__getURI, remoting__hasEvents, remoting__objectId, remoting__setURI, remoting__typeId, sendPacket, type

Types Aliases

Ptr

using Ptr = Poco::AutoPtr < UDPEndpointRemoteObject >;

Constructors

UDPEndpointRemoteObject

UDPEndpointRemoteObject(
    const Poco::RemotingNG::Identifiable::ObjectId & oid,
    Poco::SharedPtr < IoT::UDP::UDPEndpoint > pServiceObject
);

Destructor

~UDPEndpointRemoteObject virtual

virtual ~UDPEndpointRemoteObject();

Destroys the UDPEndpointRemoteObject.

Member Functions

address virtual inline

IoT::UDP::EndpointAddress address() const;

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

remoteAddress virtual inline

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

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)
);

remoting__enableRemoteEvents virtual

virtual void remoting__enableRemoteEvents(
    const std::string & protocol
);

remoting__hasEvents virtual

virtual bool remoting__hasEvents() const;

remoting__typeId virtual inline

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

sendPacket virtual inline

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

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.

event__packetReceived protected

void event__packetReceived(
    const IoT::UDP::Packet & data
);

Securely control IoT edge devices from anywhere   Connect a Device