7#ifndef YARP_OS_IMPL_PORTCOREPACKET_H
8#define YARP_OS_IMPL_PORTCOREPACKET_H
A mini-server for performing network communication in the background.
Interface implemented by all objects that can write themselves to the network, such as Bottle objects...
A single message, potentially being transmitted on multiple connections.
bool completed
has a notification of completion been sent
void setContent(const yarp::os::PortWriter *writable, bool owned=false, const yarp::os::PortWriter *callback=nullptr, bool ownedCallback=false)
Configure the object being sent and where to send notifications.
PortCorePacket * prev_
this packet will be in a list of active packets
int ct
number of uses of the messagae
void inc()
Increment the usage count for this messagae.
const yarp::os::PortWriter * callback
where to send event notifications
virtual ~PortCorePacket()
Destructor.
void complete()
Send a completion notification if we haven't already, and there's somewhere to send it to.
const yarp::os::PortWriter * getContent()
void reset()
Delete anything we own and enter a clean state, as if freshly created.
const yarp::os::PortWriter * content
the object being sent
bool ownedCallback
should we memory-manage the callback object
PortCorePacket * next_
this packet will be in a list of active packets
const yarp::os::PortWriter * getCallback()
void dec()
Decrement the usage count for this messagae.
bool owned
should we memory-manage the content object
PortCorePacket()
Constructor.
The components from which ports and connections are built.