VLink  2.0.0
A high-performance communication middleware
vlink::DiscoveryReporter类 参考

Periodic multicast broadcaster of the process's active VLink endpoints. 更多...

#include <discovery_reporter.h>

类 vlink::DiscoveryReporter 继承关系图:
vlink::DiscoveryReporter 的协作图:

Public 成员函数

 DiscoveryReporter ()
 Builds the reporter, opens its UDP socket and arms the periodic timer. 更多...
 
 ~DiscoveryReporter () override
 Stops the loop and releases the UDP socket. 更多...
 
void add (NodeImpl *node)
 Registers a node so that subsequent broadcasts include it. 更多...
 
void remove (NodeImpl *node)
 Unregisters a node so that subsequent broadcasts exclude it. 更多...
 

Protected 成员函数

size_t get_max_task_count () const override
 Returns the maximum queue depth. 更多...
 
uint32_t get_max_elapsed_time () const override
 Returns the maximum allowed task execution time in milliseconds. 更多...
 
void on_begin () override
 Hook invoked once on the loop thread before the first task runs. 更多...
 
void on_end () override
 Hook invoked once on the loop thread after the last task runs. 更多...
 

额外继承的成员函数

 Internal queue implementation type. 更多...
 Back-pressure strategy applied when the bounded queue is at capacity. 更多...
 Built-in priority levels for kPriorityType loops; higher values dispatch first. 更多...

详细描述

Periodic multicast broadcaster of the process's active VLink endpoints.

构造及析构函数说明

◆ DiscoveryReporter()

vlink::DiscoveryReporter::DiscoveryReporter ( )

Builds the reporter, opens its UDP socket and arms the periodic timer.

The MessageLoop is left idle; callers are responsible for calling async_run(). The runtime-owned process reporter does this automatically.

◆ ~DiscoveryReporter()

vlink::DiscoveryReporter::~DiscoveryReporter ( )
override

Stops the loop and releases the UDP socket.

An offline notification is only emitted when offline reporting is compiled in; the default build omits it.

成员函数说明

◆ add()

void vlink::DiscoveryReporter::add ( NodeImpl node)

Registers a node so that subsequent broadcasts include it.

Invoked automatically by NodeImpl::init_ext().

参数
nodeNode endpoint to track.

◆ get_max_elapsed_time()

uint32_t vlink::DiscoveryReporter::get_max_elapsed_time ( ) const
overrideprotectedvirtual

Returns the maximum allowed task execution time in milliseconds.

Tasks exceeding this duration trigger on_task_timeout. Zero disables the check.

返回
Maximum execution time in milliseconds.

重载 vlink::MessageLoop .

◆ get_max_task_count()

size_t vlink::DiscoveryReporter::get_max_task_count ( ) const
overrideprotectedvirtual

Returns the maximum queue depth.

返回
kMaxTaskSize (10000) by default.

重载 vlink::MessageLoop .

◆ on_begin()

void vlink::DiscoveryReporter::on_begin ( )
overrideprotectedvirtual

Hook invoked once on the loop thread before the first task runs.

Subclasses override to perform per-thread initialisation.

重载 vlink::MessageLoop .

◆ on_end()

void vlink::DiscoveryReporter::on_end ( )
overrideprotectedvirtual

Hook invoked once on the loop thread after the last task runs.

Subclasses override to perform per-thread cleanup.

重载 vlink::MessageLoop .

◆ remove()

void vlink::DiscoveryReporter::remove ( NodeImpl node)

Unregisters a node so that subsequent broadcasts exclude it.

Invoked automatically by NodeImpl::deinit_ext().

参数
nodeNode endpoint to drop.

该类的文档由以下文件生成: