/** * Send all entries in the entry store as entry assignments in a single transaction * @param connection * @throws IOException */ void ServerNetworkTableEntryStore::sendServerHello(NetworkTableConnection& connection) { Synchronized sync(LOCK); std::map<std::string, NetworkTableEntry*>::iterator itr; for (itr = namedEntries.begin(); itr != namedEntries.end(); itr++) { NetworkTableEntry* entry = itr->second; connection.sendEntryAssignment(*entry); } connection.sendServerHelloComplete(); connection.flush(); }
/** * Send all unknown entries in the entry store to the given connection * @param connection * @throws IOException */ void ClientNetworkTableEntryStore::sendUnknownEntries(NetworkTableConnection& connection) { { Synchronized sync(LOCK); std::map<std::string, NetworkTableEntry*>::iterator itr; for(itr = namedEntries.begin(); itr != namedEntries.end(); itr++) { NetworkTableEntry* entry = (*itr).second; if(entry && entry->GetId()==NetworkTableEntry::UNKNOWN_ID) connection.sendEntryAssignment(*entry); } connection.flush(); } }
void NetworkTableEntry::Send(NetworkTableConnection& connection) { connection.sendEntryAssignment(*this); }