VLink 2.0.0
A high-performance communication middleware
Loading...
Searching...
No Matches
discovery_reporter.h File Reference

Process-level discovery reporter that broadcasts node metadata to DiscoveryViewer instances. More...

#include <memory>
#include <string>
#include "../base/macros.h"
#include "../base/message_loop.h"
Include dependency graph for discovery_reporter.h:

Go to the source code of this file.

Classes

 Background MessageLoop that reports active nodes to the discovery subsystem. More...

Namespaces

Detailed Description

Process-level discovery reporter that broadcasts node metadata to DiscoveryViewer instances.

DiscoveryReporter runs as a background MessageLoop and periodically reports the list of active NodeImpl endpoints (publishers, subscribers, clients, servers, etc.) to any DiscoveryViewer instances on the same host or network.

Internally it:

  1. Collects all registered NodeImpl objects.
  2. Serialises their metadata (URL, type, process info, CPU profiler data) into a discovery message.
  3. Sends the message via UDP multicast/broadcast (default address 239.255.0.100).
  4. Sends an offline notification on destruction.

A process-global singleton is available via global_get(); it is created on first use and destroyed with the process.

Note
  • add() and remove() are called automatically by NodeImpl constructors and destructors.
  • Users generally do not need to interact with DiscoveryReporter directly.
  • The reporter uses UDP multicast/broadcast for discovery, not any VLink transport backend.