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
);
Creates a UDPEndpointRemoteObject.
Destructor
~UDPEndpointRemoteObject
virtual ~UDPEndpointRemoteObject();
Destroys the UDPEndpointRemoteObject.
Member Functions
address
IoT::UDP::EndpointAddress address() const;
Returns the local address the socket of the endpoint has been bound to.
See also: IoT::UDP::IUDPEndpoint::address()
remoteAddress
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().
See also: IoT::UDP::IUDPEndpoint::remoteAddress()
remoting__enableEvents
virtual std::string remoting__enableEvents(
Poco::RemotingNG::Listener::Ptr pListener,
bool enable = bool (true)
);
remoting__enableRemoteEvents
virtual void remoting__enableRemoteEvents(
const std::string & protocol
);
remoting__hasEvents
virtual bool remoting__hasEvents() const;
remoting__typeId
virtual const Poco::RemotingNG::Identifiable::TypeId & remoting__typeId() const;
sendPacket
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.
See also: IoT::UDP::IUDPEndpoint::sendPacket()
event__packetReceived
void event__packetReceived(
const IoT::UDP::Packet & data
);