VLink 2.0.0
A high-performance communication middleware
载入中...
搜索中...
未找到
discovery_reporter.h 文件参考

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

#include <memory>
#include <string>
#include "../base/macros.h"
#include "../base/message_loop.h"
discovery_reporter.h 的引用(Include)关系图:

浏览该文件的源代码.

 Background MessageLoop that reports active nodes to the discovery subsystem. 更多...

命名空间

详细描述

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.

注解
  • 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.