mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* Mesh: new sendFlood() overload with transport codes.
* BaseChatMesh: sendFloodScoped(), for overriding with some outbound 'scope' / TransportKey * companion: new 'send_scope' variable.
This commit is contained in:
parent
ecd30f4d36
commit
d9ff3a4d02
8 changed files with 91 additions and 12 deletions
|
|
@ -12,6 +12,13 @@ uint16_t TransportKey::calcTransportCode(const mesh::Packet* packet) const {
|
|||
return code;
|
||||
}
|
||||
|
||||
bool TransportKey::isNull() const {
|
||||
for (int i = 0; i < sizeof(key); i++) {
|
||||
if (key[i]) return false;
|
||||
}
|
||||
return true; // key is all zeroes
|
||||
}
|
||||
|
||||
void TransportKeyStore::putCache(uint16_t id, const TransportKey& key) {
|
||||
if (num_cache < MAX_TKS_ENTRIES) {
|
||||
cache_ids[num_cache] = id;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue