20 while (!inactive.empty()) {
21 delete inactive.back();
24 while (!active.empty()) {
37 if (inactive.empty()) {
41 inactive.push_back(
obj);
44 if (next ==
nullptr) {
51 inactive.remove(next);
52 active.push_back(next);
58 if (packet !=
nullptr) {
63 active.remove(packet);
64 inactive.push_back(packet);
70 if (packet !=
nullptr) {
81 if (packet !=
nullptr) {
A mini-server for performing network communication in the background.
A single message, potentially being transmitted on multiple connections.
bool completed
has a notification of completion been sent
void complete()
Send a completion notification if we haven't already, and there's somewhere to send it to.
void reset()
Delete anything we own and enter a clean state, as if freshly created.
A collection of messages being transmitted over connections.
bool completePacket(PortCorePacket *packet)
Send a completion notification if a packet has finished being sent on all connections.
virtual ~PortCorePackets()
PortCorePacket * getFreePacket()
Get a packet that we can prepare for sending.
bool checkPacket(PortCorePacket *packet)
Move a packet to the inactive state if it has finished being sent on all connections.
void freePacket(PortCorePacket *packet, bool clear=true)
Force the given packet into an inactive state.
#define yCError(component,...)
#define yCAssert(component, x)
#define YARP_OS_LOG_COMPONENT(name, name_string)