rework Network send() code to use NetworkTarget/Node/Group::send classes, add a NetworkMessage class for sending NetworkObject messages, and fix a bug whereby the server's client TCP sockets weren't nonblocking.... I wonder how this has worked before?\!
#include "Group.hh"
#include "Node.hh"
void NetworkGroup::send_pkt (const NetworkPacketBuffer &pkt, bool reliable) {
// iterate + recurse send_pkt
for (iterator_type it = targets_begin; it != targets_end; it++) {
// handle as NetworkTarget
NetworkTarget *target = static_cast<NetworkTarget*>(*it);
// exclude?
if (target == exclude)
continue;
// recurse
target->send_pkt(pkt, reliable);
}
}