llarp::service::Context
holds all the hidden service endpoints we own this should be refactored (removed entirely...?) now that lokinet only supports one endpoint per instance
#include <context.hpp>
Public Functions
| Name | |
|---|---|
| Context(AbstractRouter * r) | |
| ~Context() | |
| void | Tick(llarp_time_t now) |
| bool | StopAll() stop all held services |
| bool | hasEndpoints() |
| void | ForEachService(std::function< bool(const std::string &, const Endpoint_ptr &)> visit) const function visitor returns false to prematurely break iteration |
| void | Pump() Pumps the hidden service endpoints, called during Router::PumpLL. |
| void | AddEndpoint(const Config & conf, bool autostart =false) add endpoint via config |
| void | InjectEndpoint(std::string name, std::shared_ptr< Endpoint > ep) inject endpoint instance |
| bool | RemoveEndpoint(const std::string & name) stop and remove an endpoint by name return false if we don't have the hidden service with that name |
| Endpoint_ptr | GetEndpointByName(const std::string & name) const |
| Endpoint_ptr | GetDefault() const |
| bool | StartAll() |
Public Functions Documentation
function Context
explicit Context(
AbstractRouter * r
)
function ~Context
~Context()
function Tick
void Tick(
llarp_time_t now
)
function StopAll
bool StopAll()
stop all held services
function hasEndpoints
bool hasEndpoints()
function ForEachService
void ForEachService(
std::function< bool(const std::string &, const Endpoint_ptr &)> visit
) const
function visitor returns false to prematurely break iteration
function Pump
void Pump()
Pumps the hidden service endpoints, called during Router::PumpLL.
function AddEndpoint
void AddEndpoint(
const Config & conf,
bool autostart =false
)
add endpoint via config
function InjectEndpoint
void InjectEndpoint(
std::string name,
std::shared_ptr< Endpoint > ep
)
inject endpoint instance
function RemoveEndpoint
bool RemoveEndpoint(
const std::string & name
)
stop and remove an endpoint by name return false if we don't have the hidden service with that name
function GetEndpointByName
Endpoint_ptr GetEndpointByName(
const std::string & name
) const
function GetDefault
inline Endpoint_ptr GetDefault() const
function StartAll
bool StartAll()
Updated on 2026-01-10 at 22:49:45 +0000