p2pfl.communication.protocols.protobuff.heartbeater moduleΒΆ

Protocol agnostic heartbeater.

class p2pfl.communication.protocols.protobuff.heartbeater.Heartbeater(neighbors, build_msg)[source]ΒΆ

Bases: Thread, NodeComponent

Heartbeater for agnostic communication protocol. Send and update fresh heartbeats.

TODO: Merge heartbeats to increase efficiency.

Parameters:

neighbors (Neighbors) – Neighbors to update.

beat(*args: Any, **kwargs: Any) AnyΒΆ
Return type:

Any

run(*args: Any, **kwargs: Any) AnyΒΆ

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

Return type:

Any

set_addr(addr)[source]ΒΆ

Set the address.

Return type:

str

stop(*args: Any, **kwargs: Any) AnyΒΆ
Return type:

Any