Back to Site
Loading...
Searching...
No Matches
librats::Subsystem Class Referenceabstract

A pluggable network subsystem. More...

#include <peer_network.h>

Inheritance diagram for librats::Subsystem:
[legend]

Public Member Functions

virtual ~Subsystem ()=default
virtual void attach (NodeContext &ctx)=0
virtual void start ()=0
virtual void stop ()=0

Detailed Description

A pluggable network subsystem.

Owns its own threads/sockets if it needs them; reaches the rest of the node only through the NodeContext it is attached to (the peer mesh via ctx.network, host events via ctx.events, sibling modules via ctx.services). A subsystem is mocked in tests by faking those interfaces.

attach() is called once, at the first start() after the subsystem was added; start() and stop() then pair up for every run of a node that is restarted.

Definition at line 176 of file peer_network.h.

Constructor & Destructor Documentation

◆ ~Subsystem()

virtual librats::Subsystem::~Subsystem ( )
virtualdefault

Member Function Documentation

◆ attach()

◆ start()

◆ stop()


The documentation for this class was generated from the following file: