---
title: llarp::path::PathSet
summary: a set of paths owned by an entity 

---

# llarp::path::PathSet



a set of paths owned by an entity 


`#include <pathset.hpp>`

Inherited by [llarp::path::Builder](Classes/structllarp_1_1path_1_1Builder.md)

## Protected Types

|                | Name           |
| -------------- | -------------- |
| using [util::NullMutex](Classes/structllarp_1_1util_1_1NullMutex.md) | **[Mtx_t](Classes/structllarp_1_1path_1_1PathSet.md#using-mtx-t)**  |
| using [util::NullLock](Classes/structllarp_1_1util_1_1NullLock.md) | **[Lock_t](Classes/structllarp_1_1path_1_1PathSet.md#using-lock-t)**  |
| using std::unordered_map< std::pair< [RouterID](Classes/structllarp_1_1RouterID.md), [PathID_t](Classes/structllarp_1_1PathID__t.md) >, Path_ptr > | **[PathMap_t](Classes/structllarp_1_1path_1_1PathSet.md#using-pathmap-t)**  |

## Public Functions

|                | Name           |
| -------------- | -------------- |
| | **[PathSet](Classes/structllarp_1_1path_1_1PathSet.md#function-pathset)**(size_t numDesiredPaths)<br>construct @params numDesiredPaths the number of paths to maintain  |
| virtual PathSet_ptr | **[GetSelf](Classes/structllarp_1_1path_1_1PathSet.md#function-getself)**() =0<br>get a shared_ptr of ourself  |
| virtual std::weak_ptr< [PathSet](Classes/structllarp_1_1path_1_1PathSet.md) > | **[GetWeak](Classes/structllarp_1_1path_1_1PathSet.md#function-getweak)**() =0<br>get a weak_ptr of ourself  |
| virtual void | **[BuildOne](Classes/structllarp_1_1path_1_1PathSet.md#function-buildone)**(PathRole roles =ePathRoleAny) =0 |
| virtual void | **[Build](Classes/structllarp_1_1path_1_1PathSet.md#function-build)**(std::vector< [RouterContact](Classes/structllarp_1_1RouterContact.md) > hops, PathRole roles =ePathRoleAny) =0<br>manual build on these hops  |
| virtual void | **[Tick](Classes/structllarp_1_1path_1_1PathSet.md#function-tick)**(llarp_time_t now)<br>tick owned paths  |
| size_t | **[NumPathsExistingAt](Classes/structllarp_1_1path_1_1PathSet.md#function-numpathsexistingat)**(llarp_time_t futureTime) const<br>count the number of paths that will exist at this timestamp in future  |
| virtual void | **[HandlePathBuilt](Classes/structllarp_1_1path_1_1PathSet.md#function-handlepathbuilt)**(Path_ptr path) =0 |
| virtual void | **[HandlePathBuildTimeout](Classes/structllarp_1_1path_1_1PathSet.md#function-handlepathbuildtimeout)**(Path_ptr path) |
| virtual void | **[HandlePathBuildFailedAt](Classes/structllarp_1_1path_1_1PathSet.md#function-handlepathbuildfailedat)**(Path_ptr path, [RouterID](Classes/structllarp_1_1RouterID.md) hop) |
| virtual void | **[PathBuildStarted](Classes/structllarp_1_1path_1_1PathSet.md#function-pathbuildstarted)**(Path_ptr path) |
| virtual void | **[HandlePathDied](Classes/structllarp_1_1path_1_1PathSet.md#function-handlepathdied)**(Path_ptr path)<br>a path died now what?  |
| bool | **[GetNewestIntro](Classes/structllarp_1_1path_1_1PathSet.md#function-getnewestintro)**([service::Introduction](Classes/structllarp_1_1service_1_1Introduction.md) & intro) const |
| void | **[AddPath](Classes/structllarp_1_1path_1_1PathSet.md#function-addpath)**(Path_ptr path) |
| Path_ptr | **[GetByUpstream](Classes/structllarp_1_1path_1_1PathSet.md#function-getbyupstream)**([RouterID](Classes/structllarp_1_1RouterID.md) remote, [PathID_t](Classes/structllarp_1_1PathID__t.md) rxid) const |
| void | **[ExpirePaths](Classes/structllarp_1_1path_1_1PathSet.md#function-expirepaths)**(llarp_time_t now, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * router) |
| size_t | **[NumInStatus](Classes/structllarp_1_1path_1_1PathSet.md#function-numinstatus)**(PathStatus st) const<br>get the number of paths in this status  |
| size_t | **[AvailablePaths](Classes/structllarp_1_1path_1_1PathSet.md#function-availablepaths)**(PathRole role) const<br>get the number of paths that match the role that are available  |
| virtual llarp_time_t | **[Now](Classes/structllarp_1_1path_1_1PathSet.md#function-now)**() const =0<br>get time from event loop  |
| virtual bool | **[Stop](Classes/structllarp_1_1path_1_1PathSet.md#function-stop)**() =0<br>stop this pathset and mark it as to be removed  |
| virtual bool | **[IsStopped](Classes/structllarp_1_1path_1_1PathSet.md#function-isstopped)**() const =0<br>return true if we are stopped  |
| virtual std::string | **[Name](Classes/structllarp_1_1path_1_1PathSet.md#function-name)**() const =0<br>get the "name" of this pathset  |
| virtual bool | **[ShouldRemove](Classes/structllarp_1_1path_1_1PathSet.md#function-shouldremove)**() const =0<br>return true if we can and should remove this pathset and underlying resources from its parent context  |
| virtual bool | **[ShouldBuildMore](Classes/structllarp_1_1path_1_1PathSet.md#function-shouldbuildmore)**(llarp_time_t now) const<br>return true if we should build another path  |
| virtual bool | **[ShouldBuildMoreForRoles](Classes/structllarp_1_1path_1_1PathSet.md#function-shouldbuildmoreforroles)**(llarp_time_t now, PathRole roles) const<br>return true if we need another path with the given path roles  |
| virtual size_t | **[MinRequiredForRoles](Classes/structllarp_1_1path_1_1PathSet.md#function-minrequiredforroles)**(PathRole roles) const<br>return the minimum number of paths we want for given roles  |
| virtual bool | **[ShouldPublishDescriptors](Classes/structllarp_1_1path_1_1PathSet.md#function-shouldpublishdescriptors)**(] llarp_time_t now) const<br>return true if we should publish a new hidden service descriptor  |
| virtual void | **[BlacklistSNode](Classes/structllarp_1_1path_1_1PathSet.md#function-blacklistsnode)**(const RouterID) =0 |
| virtual bool | **[HandleGotIntroMessage](Classes/structllarp_1_1path_1_1PathSet.md#function-handlegotintromessage)**(std::shared_ptr< const [dht::GotIntroMessage](Classes/structllarp_1_1dht_1_1GotIntroMessage.md) > )<br>override me in subtype  |
| virtual bool | **[HandleGotRouterMessage](Classes/structllarp_1_1path_1_1PathSet.md#function-handlegotroutermessage)**(std::shared_ptr< const [dht::GotRouterMessage](Classes/structllarp_1_1dht_1_1GotRouterMessage.md) > )<br>override me in subtype  |
| virtual bool | **[HandleGotNameMessage](Classes/structllarp_1_1path_1_1PathSet.md#function-handlegotnamemessage)**(std::shared_ptr< const [dht::GotNameMessage](Classes/structllarp_1_1dht_1_1GotNameMessage.md) > )<br>override me in subtype  |
| virtual [routing::IMessageHandler](Classes/structllarp_1_1routing_1_1IMessageHandler.md) * | **[GetDHTHandler](Classes/structllarp_1_1path_1_1PathSet.md#function-getdhthandler)**() |
| Path_ptr | **[GetEstablishedPathClosestTo](Classes/structllarp_1_1path_1_1PathSet.md#function-getestablishedpathclosestto)**([RouterID](Classes/structllarp_1_1RouterID.md) router, std::unordered_set< [RouterID](Classes/structllarp_1_1RouterID.md) > excluding ={}, PathRole roles =ePathRoleAny) const |
| Path_ptr | **[PickEstablishedPath](Classes/structllarp_1_1path_1_1PathSet.md#function-pickestablishedpath)**(PathRole roles =ePathRoleAny) const |
| Path_ptr | **[PickRandomEstablishedPath](Classes/structllarp_1_1path_1_1PathSet.md#function-pickrandomestablishedpath)**(PathRole roles =ePathRoleAny) const |
| Path_ptr | **[GetPathByRouter](Classes/structllarp_1_1path_1_1PathSet.md#function-getpathbyrouter)**([RouterID](Classes/structllarp_1_1RouterID.md) router, PathRole roles =ePathRoleAny) const |
| Path_ptr | **[GetNewestPathByRouter](Classes/structllarp_1_1path_1_1PathSet.md#function-getnewestpathbyrouter)**([RouterID](Classes/structllarp_1_1RouterID.md) router, PathRole roles =ePathRoleAny) const |
| Path_ptr | **[GetRandomPathByRouter](Classes/structllarp_1_1path_1_1PathSet.md#function-getrandompathbyrouter)**([RouterID](Classes/structllarp_1_1RouterID.md) router, PathRole roles =ePathRoleAny) const |
| Path_ptr | **[GetPathByID](Classes/structllarp_1_1path_1_1PathSet.md#function-getpathbyid)**([PathID_t](Classes/structllarp_1_1PathID__t.md) id) const |
| Path_ptr | **[GetByEndpointWithID](Classes/structllarp_1_1path_1_1PathSet.md#function-getbyendpointwithid)**([RouterID](Classes/structllarp_1_1RouterID.md) router, [PathID_t](Classes/structllarp_1_1PathID__t.md) id) const |
| std::optional< std::set< [service::Introduction](Classes/structllarp_1_1service_1_1Introduction.md) > > | **[GetCurrentIntroductionsWithFilter](Classes/structllarp_1_1path_1_1PathSet.md#function-getcurrentintroductionswithfilter)**(std::function< bool(const [service::Introduction](Classes/structllarp_1_1service_1_1Introduction.md) &)> filter) const |
| virtual bool | **[PublishIntroSet](Classes/structllarp_1_1path_1_1PathSet.md#function-publishintroset)**(const [service::EncryptedIntroSet](Classes/structllarp_1_1service_1_1EncryptedIntroSet.md) & , [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * ) |
| virtual void | **[ResetInternalState](Classes/structllarp_1_1path_1_1PathSet.md#function-resetinternalstate)**() =0<br>reset all cooldown timers  |
| virtual bool | **[BuildOneAlignedTo](Classes/structllarp_1_1path_1_1PathSet.md#function-buildonealignedto)**(const [RouterID](Classes/structllarp_1_1RouterID.md) endpoint) =0 |
| virtual void | **[SendPacketToRemote](Classes/structllarp_1_1path_1_1PathSet.md#function-sendpackettoremote)**(const [llarp_buffer_t](Classes/structllarp__buffer__t.md) & pkt, service::ProtocolType t) =0 |
| virtual std::optional< std::vector< [RouterContact](Classes/structllarp_1_1RouterContact.md) > > | **[GetHopsForBuild](Classes/structllarp_1_1path_1_1PathSet.md#function-gethopsforbuild)**() =0 |
| void | **[ForEachPath](Classes/structllarp_1_1path_1_1PathSet.md#function-foreachpath)**(std::function< void(const Path_ptr &)> visit) const |
| void | **[UpstreamFlush](Classes/structllarp_1_1path_1_1PathSet.md#function-upstreamflush)**([AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) |
| void | **[DownstreamFlush](Classes/structllarp_1_1path_1_1PathSet.md#function-downstreamflush)**([AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) |

## Protected Functions

|                | Name           |
| -------------- | -------------- |
| void | **[TickPaths](Classes/structllarp_1_1path_1_1PathSet.md#function-tickpaths)**([AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) |

## Public Attributes

|                | Name           |
| -------------- | -------------- |
| constexpr size_t | **[max_paths](Classes/structllarp_1_1path_1_1PathSet.md#variable-max-paths)** <br>maximum number of paths a path set can maintain  |
| size_t | **[numDesiredPaths](Classes/structllarp_1_1path_1_1PathSet.md#variable-numdesiredpaths)**  |

## Protected Attributes

|                | Name           |
| -------------- | -------------- |
| [BuildStats](Classes/structllarp_1_1path_1_1BuildStats.md) | **[m_BuildStats](Classes/structllarp_1_1path_1_1PathSet.md#variable-m-buildstats)**  |
| [Mtx_t](Classes/structllarp_1_1util_1_1NullMutex.md) | **[m_PathsMutex](Classes/structllarp_1_1path_1_1PathSet.md#variable-m-pathsmutex)**  |
| PathMap_t | **[m_Paths](Classes/structllarp_1_1path_1_1PathSet.md#variable-m-paths)**  |

## Protected Types Documentation

### using Mtx_t

```cpp
using llarp::path::PathSet::Mtx_t =  util::NullMutex;
```


### using Lock_t

```cpp
using llarp::path::PathSet::Lock_t =  util::NullLock;
```


### using PathMap_t

```cpp
using llarp::path::PathSet::PathMap_t =  std::unordered_map<std::pair<RouterID, PathID_t>, Path_ptr>;
```


## Public Functions Documentation

### function PathSet

```cpp
PathSet(
    size_t numDesiredPaths
)
```

construct @params numDesiredPaths the number of paths to maintain 

### function GetSelf

```cpp
virtual PathSet_ptr GetSelf() =0
```

get a shared_ptr of ourself 

**Reimplemented by**: [llarp::exit::BaseSession::GetSelf](Classes/structllarp_1_1exit_1_1BaseSession.md#function-getself), [llarp::service::Endpoint::GetSelf](Classes/structllarp_1_1service_1_1Endpoint.md#function-getself), [llarp::service::OutboundContext::GetSelf](Classes/structllarp_1_1service_1_1OutboundContext.md#function-getself)


### function GetWeak

```cpp
virtual std::weak_ptr< PathSet > GetWeak() =0
```

get a weak_ptr of ourself 

**Reimplemented by**: [llarp::exit::BaseSession::GetWeak](Classes/structllarp_1_1exit_1_1BaseSession.md#function-getweak), [llarp::service::Endpoint::GetWeak](Classes/structllarp_1_1service_1_1Endpoint.md#function-getweak), [llarp::service::OutboundContext::GetWeak](Classes/structllarp_1_1service_1_1OutboundContext.md#function-getweak)


### function BuildOne

```cpp
virtual void BuildOne(
    PathRole roles =ePathRoleAny
) =0
```


**Reimplemented by**: [llarp::path::Builder::BuildOne](Classes/structllarp_1_1path_1_1Builder.md#function-buildone)


### function Build

```cpp
virtual void Build(
    std::vector< RouterContact > hops,
    PathRole roles =ePathRoleAny
) =0
```

manual build on these hops 

**Reimplemented by**: [llarp::path::Builder::Build](Classes/structllarp_1_1path_1_1Builder.md#function-build)


### function Tick

```cpp
virtual void Tick(
    llarp_time_t now
)
```

tick owned paths 

**Reimplemented by**: [llarp::path::Builder::Tick](Classes/structllarp_1_1path_1_1Builder.md#function-tick), [llarp::service::Endpoint::Tick](Classes/structllarp_1_1service_1_1Endpoint.md#function-tick), [llarp::service::OutboundContext::Tick](Classes/structllarp_1_1service_1_1OutboundContext.md#function-tick)


### function NumPathsExistingAt

```cpp
size_t NumPathsExistingAt(
    llarp_time_t futureTime
) const
```

count the number of paths that will exist at this timestamp in future 

### function HandlePathBuilt

```cpp
virtual void HandlePathBuilt(
    Path_ptr path
) =0
```


**Reimplemented by**: [llarp::exit::BaseSession::HandlePathBuilt](Classes/structllarp_1_1exit_1_1BaseSession.md#function-handlepathbuilt), [llarp::service::Endpoint::HandlePathBuilt](Classes/structllarp_1_1service_1_1Endpoint.md#function-handlepathbuilt), [llarp::service::OutboundContext::HandlePathBuilt](Classes/structllarp_1_1service_1_1OutboundContext.md#function-handlepathbuilt), [llarp::path::Builder::HandlePathBuilt](Classes/structllarp_1_1path_1_1Builder.md#function-handlepathbuilt)


### function HandlePathBuildTimeout

```cpp
virtual void HandlePathBuildTimeout(
    Path_ptr path
)
```


**Reimplemented by**: [llarp::service::OutboundContext::HandlePathBuildTimeout](Classes/structllarp_1_1service_1_1OutboundContext.md#function-handlepathbuildtimeout), [llarp::path::Builder::HandlePathBuildTimeout](Classes/structllarp_1_1path_1_1Builder.md#function-handlepathbuildtimeout)


### function HandlePathBuildFailedAt

```cpp
virtual void HandlePathBuildFailedAt(
    Path_ptr path,
    RouterID hop
)
```


**Reimplemented by**: [llarp::service::OutboundContext::HandlePathBuildFailedAt](Classes/structllarp_1_1service_1_1OutboundContext.md#function-handlepathbuildfailedat), [llarp::path::Builder::HandlePathBuildFailedAt](Classes/structllarp_1_1path_1_1Builder.md#function-handlepathbuildfailedat)


### function PathBuildStarted

```cpp
virtual void PathBuildStarted(
    Path_ptr path
)
```


**Reimplemented by**: [llarp::service::Endpoint::PathBuildStarted](Classes/structllarp_1_1service_1_1Endpoint.md#function-pathbuildstarted)


### function HandlePathDied

```cpp
virtual void HandlePathDied(
    Path_ptr path
)
```

a path died now what? 

**Reimplemented by**: [llarp::exit::BaseSession::HandlePathDied](Classes/structllarp_1_1exit_1_1BaseSession.md#function-handlepathdied), [llarp::service::Endpoint::HandlePathDied](Classes/structllarp_1_1service_1_1Endpoint.md#function-handlepathdied), [llarp::service::OutboundContext::HandlePathDied](Classes/structllarp_1_1service_1_1OutboundContext.md#function-handlepathdied)


### function GetNewestIntro

```cpp
bool GetNewestIntro(
    service::Introduction & intro
) const
```


### function AddPath

```cpp
void AddPath(
    Path_ptr path
)
```


### function GetByUpstream

```cpp
Path_ptr GetByUpstream(
    RouterID remote,
    PathID_t rxid
) const
```


### function ExpirePaths

```cpp
void ExpirePaths(
    llarp_time_t now,
    AbstractRouter * router
)
```


### function NumInStatus

```cpp
size_t NumInStatus(
    PathStatus st
) const
```

get the number of paths in this status 

### function AvailablePaths

```cpp
size_t AvailablePaths(
    PathRole role
) const
```

get the number of paths that match the role that are available 

### function Now

```cpp
virtual llarp_time_t Now() const =0
```

get time from event loop 

**Reimplemented by**: [llarp::path::Builder::Now](Classes/structllarp_1_1path_1_1Builder.md#function-now)


### function Stop

```cpp
virtual bool Stop() =0
```

stop this pathset and mark it as to be removed 

**Reimplemented by**: [llarp::exit::BaseSession::Stop](Classes/structllarp_1_1exit_1_1BaseSession.md#function-stop), [llarp::path::Builder::Stop](Classes/structllarp_1_1path_1_1Builder.md#function-stop), [llarp::service::Endpoint::Stop](Classes/structllarp_1_1service_1_1Endpoint.md#function-stop), [llarp::service::OutboundContext::Stop](Classes/structllarp_1_1service_1_1OutboundContext.md#function-stop)


### function IsStopped

```cpp
virtual bool IsStopped() const =0
```

return true if we are stopped 

**Reimplemented by**: [llarp::path::Builder::IsStopped](Classes/structllarp_1_1path_1_1Builder.md#function-isstopped)


### function Name

```cpp
virtual std::string Name() const =0
```

get the "name" of this pathset 

**Reimplemented by**: [llarp::exit::ExitSession::Name](Classes/structllarp_1_1exit_1_1ExitSession.md#function-name), [llarp::exit::SNodeSession::Name](Classes/structllarp_1_1exit_1_1SNodeSession.md#function-name), [llarp::service::Endpoint::Name](Classes/structllarp_1_1service_1_1Endpoint.md#function-name), [llarp::service::OutboundContext::Name](Classes/structllarp_1_1service_1_1OutboundContext.md#function-name)


### function ShouldRemove

```cpp
virtual bool ShouldRemove() const =0
```

return true if we can and should remove this pathset and underlying resources from its parent context 

**Reimplemented by**: [llarp::path::Builder::ShouldRemove](Classes/structllarp_1_1path_1_1Builder.md#function-shouldremove)


### function ShouldBuildMore

```cpp
virtual bool ShouldBuildMore(
    llarp_time_t now
) const
```

return true if we should build another path 

**Reimplemented by**: [llarp::exit::BaseSession::ShouldBuildMore](Classes/structllarp_1_1exit_1_1BaseSession.md#function-shouldbuildmore), [llarp::path::Builder::ShouldBuildMore](Classes/structllarp_1_1path_1_1Builder.md#function-shouldbuildmore), [llarp::service::Endpoint::ShouldBuildMore](Classes/structllarp_1_1service_1_1Endpoint.md#function-shouldbuildmore), [llarp::service::OutboundContext::ShouldBuildMore](Classes/structllarp_1_1service_1_1OutboundContext.md#function-shouldbuildmore)


### function ShouldBuildMoreForRoles

```cpp
virtual bool ShouldBuildMoreForRoles(
    llarp_time_t now,
    PathRole roles
) const
```

return true if we need another path with the given path roles 

### function MinRequiredForRoles

```cpp
virtual size_t MinRequiredForRoles(
    PathRole roles
) const
```

return the minimum number of paths we want for given roles 

### function ShouldPublishDescriptors

```cpp
inline virtual bool ShouldPublishDescriptors(
    ] llarp_time_t now
) const
```

return true if we should publish a new hidden service descriptor 

### function BlacklistSNode

```cpp
virtual void BlacklistSNode(
    const RouterID
) =0
```


**Reimplemented by**: [llarp::exit::BaseSession::BlacklistSNode](Classes/structllarp_1_1exit_1_1BaseSession.md#function-blacklistsnode), [llarp::service::Endpoint::BlacklistSNode](Classes/structllarp_1_1service_1_1Endpoint.md#function-blacklistsnode), [llarp::service::OutboundContext::BlacklistSNode](Classes/structllarp_1_1service_1_1OutboundContext.md#function-blacklistsnode)


### function HandleGotIntroMessage

```cpp
inline virtual bool HandleGotIntroMessage(
    std::shared_ptr< const dht::GotIntroMessage > 
)
```

override me in subtype 

**Reimplemented by**: [llarp::service::Endpoint::HandleGotIntroMessage](Classes/structllarp_1_1service_1_1Endpoint.md#function-handlegotintromessage)


### function HandleGotRouterMessage

```cpp
inline virtual bool HandleGotRouterMessage(
    std::shared_ptr< const dht::GotRouterMessage > 
)
```

override me in subtype 

**Reimplemented by**: [llarp::service::Endpoint::HandleGotRouterMessage](Classes/structllarp_1_1service_1_1Endpoint.md#function-handlegotroutermessage)


### function HandleGotNameMessage

```cpp
inline virtual bool HandleGotNameMessage(
    std::shared_ptr< const dht::GotNameMessage > 
)
```

override me in subtype 

**Reimplemented by**: [llarp::service::Endpoint::HandleGotNameMessage](Classes/structllarp_1_1service_1_1Endpoint.md#function-handlegotnamemessage)


### function GetDHTHandler

```cpp
inline virtual routing::IMessageHandler * GetDHTHandler()
```


### function GetEstablishedPathClosestTo

```cpp
Path_ptr GetEstablishedPathClosestTo(
    RouterID router,
    std::unordered_set< RouterID > excluding ={},
    PathRole roles =ePathRoleAny
) const
```


### function PickEstablishedPath

```cpp
Path_ptr PickEstablishedPath(
    PathRole roles =ePathRoleAny
) const
```


### function PickRandomEstablishedPath

```cpp
Path_ptr PickRandomEstablishedPath(
    PathRole roles =ePathRoleAny
) const
```


### function GetPathByRouter

```cpp
Path_ptr GetPathByRouter(
    RouterID router,
    PathRole roles =ePathRoleAny
) const
```


### function GetNewestPathByRouter

```cpp
Path_ptr GetNewestPathByRouter(
    RouterID router,
    PathRole roles =ePathRoleAny
) const
```


### function GetRandomPathByRouter

```cpp
Path_ptr GetRandomPathByRouter(
    RouterID router,
    PathRole roles =ePathRoleAny
) const
```


### function GetPathByID

```cpp
Path_ptr GetPathByID(
    PathID_t id
) const
```


### function GetByEndpointWithID

```cpp
Path_ptr GetByEndpointWithID(
    RouterID router,
    PathID_t id
) const
```


### function GetCurrentIntroductionsWithFilter

```cpp
std::optional< std::set< service::Introduction > > GetCurrentIntroductionsWithFilter(
    std::function< bool(const service::Introduction &)> filter
) const
```


### function PublishIntroSet

```cpp
inline virtual bool PublishIntroSet(
    const service::EncryptedIntroSet & ,
    AbstractRouter * 
)
```


**Reimplemented by**: [llarp::service::Endpoint::PublishIntroSet](Classes/structllarp_1_1service_1_1Endpoint.md#function-publishintroset)


### function ResetInternalState

```cpp
virtual void ResetInternalState() =0
```

reset all cooldown timers 

**Reimplemented by**: [llarp::exit::BaseSession::ResetInternalState](Classes/structllarp_1_1exit_1_1BaseSession.md#function-resetinternalstate), [llarp::path::Builder::ResetInternalState](Classes/structllarp_1_1path_1_1Builder.md#function-resetinternalstate), [llarp::service::Endpoint::ResetInternalState](Classes/structllarp_1_1service_1_1Endpoint.md#function-resetinternalstate)


### function BuildOneAlignedTo

```cpp
virtual bool BuildOneAlignedTo(
    const RouterID endpoint
) =0
```


**Reimplemented by**: [llarp::path::Builder::BuildOneAlignedTo](Classes/structllarp_1_1path_1_1Builder.md#function-buildonealignedto)


### function SendPacketToRemote

```cpp
virtual void SendPacketToRemote(
    const llarp_buffer_t & pkt,
    service::ProtocolType t
) =0
```


**Reimplemented by**: [llarp::service::OutboundContext::SendPacketToRemote](Classes/structllarp_1_1service_1_1OutboundContext.md#function-sendpackettoremote), [llarp::service::Endpoint::SendPacketToRemote](Classes/structllarp_1_1service_1_1Endpoint.md#function-sendpackettoremote), [llarp::exit::ExitSession::SendPacketToRemote](Classes/structllarp_1_1exit_1_1ExitSession.md#function-sendpackettoremote), [llarp::exit::SNodeSession::SendPacketToRemote](Classes/structllarp_1_1exit_1_1SNodeSession.md#function-sendpackettoremote)


### function GetHopsForBuild

```cpp
virtual std::optional< std::vector< RouterContact > > GetHopsForBuild() =0
```


**Reimplemented by**: [llarp::exit::BaseSession::GetHopsForBuild](Classes/structllarp_1_1exit_1_1BaseSession.md#function-gethopsforbuild), [llarp::path::Builder::GetHopsForBuild](Classes/structllarp_1_1path_1_1Builder.md#function-gethopsforbuild), [llarp::service::Endpoint::GetHopsForBuild](Classes/structllarp_1_1service_1_1Endpoint.md#function-gethopsforbuild), [llarp::service::OutboundContext::GetHopsForBuild](Classes/structllarp_1_1service_1_1OutboundContext.md#function-gethopsforbuild)


### function ForEachPath

```cpp
inline void ForEachPath(
    std::function< void(const Path_ptr &)> visit
) const
```


### function UpstreamFlush

```cpp
void UpstreamFlush(
    AbstractRouter * r
)
```


### function DownstreamFlush

```cpp
void DownstreamFlush(
    AbstractRouter * r
)
```


## Protected Functions Documentation

### function TickPaths

```cpp
void TickPaths(
    AbstractRouter * r
)
```


## Public Attributes Documentation

### variable max_paths

```cpp
static constexpr size_t max_paths = 32;
```

maximum number of paths a path set can maintain 

### variable numDesiredPaths

```cpp
size_t numDesiredPaths;
```


## Protected Attributes Documentation

### variable m_BuildStats

```cpp
BuildStats m_BuildStats;
```


### variable m_PathsMutex

```cpp
Mtx_t m_PathsMutex;
```


### variable m_Paths

```cpp
PathMap_t m_Paths;
```


-------------------------------

Updated on 2023-03-06 at 20:36:34 +0000