The narrow contract a subsystem needs from the node — and nothing more. More...
#include "core/bytes.h"#include "wire/frame.h"#include "peer/peer_id.h"#include "peer/peer_info.h"#include "core/address.h"#include <cstdint>#include <functional>#include <vector>Go to the source code of this file.
Classes | |
| class | librats::PeerNetwork |
| class | librats::Subsystem |
| A pluggable network subsystem. More... | |
Namespaces | |
| namespace | librats |
The narrow contract a subsystem needs from the node — and nothing more.
Subsystems (DHT, GossipSub, file transfer, …) talk to the network only through PeerNetwork. They never see Node's internals, never hold a Node& or are friends of it — this narrow contract is what keeps the node a small core instead of a god-class that every feature reaches into. A subsystem is mocked in tests by implementing this one interface.
Definition in file peer_network.h.