---
title: llarp::path::Builder

---

# llarp::path::Builder





Inherits from [llarp::path::PathSet](Classes/structllarp_1_1path_1_1PathSet.md)

Inherited by [llarp::exit::BaseSession](Classes/structllarp_1_1exit_1_1BaseSession.md), [llarp::service::Endpoint](Classes/structllarp_1_1service_1_1Endpoint.md), [llarp::service::OutboundContext](Classes/structllarp_1_1service_1_1OutboundContext.md)

## Public Functions

|                | Name           |
| -------------- | -------------- |
| | **[Builder](Classes/structllarp_1_1path_1_1Builder.md#function-builder)**([AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * p_router, size_t numDesiredPaths, size_t numHops)<br>construct  |
| virtual | **[~Builder](Classes/structllarp_1_1path_1_1Builder.md#function-~builder)**() =default |
| util::StatusObject | **[ExtractStatus](Classes/structllarp_1_1path_1_1Builder.md#function-extractstatus)**() const |
| virtual bool | **[ShouldBuildMore](Classes/structllarp_1_1path_1_1Builder.md#function-shouldbuildmore)**(llarp_time_t now) const override<br>return true if we should build another path  |
| virtual bool | **[ShouldBundleRC](Classes/structllarp_1_1path_1_1Builder.md#function-shouldbundlerc)**() const =0<br>should we bundle RCs in builds?  |
| virtual void | **[ResetInternalState](Classes/structllarp_1_1path_1_1Builder.md#function-resetinternalstate)**() override<br>reset all cooldown timers  |
| bool | **[BuildCooldownHit](Classes/structllarp_1_1path_1_1Builder.md#function-buildcooldownhit)**(llarp_time_t now) const<br>return true if we hit our soft limit for building paths too fast  |
| virtual PathRole | **[GetRoles](Classes/structllarp_1_1path_1_1Builder.md#function-getroles)**() const<br>get roles for this path builder  |
| [BuildStats](Classes/structllarp_1_1path_1_1BuildStats.md) | **[CurrentBuildStats](Classes/structllarp_1_1path_1_1Builder.md#function-currentbuildstats)**() const |
| virtual bool | **[Stop](Classes/structllarp_1_1path_1_1Builder.md#function-stop)**() override<br>stop this pathset and mark it as to be removed  |
| virtual bool | **[IsStopped](Classes/structllarp_1_1path_1_1Builder.md#function-isstopped)**() const override<br>return true if we are stopped  |
| virtual bool | **[ShouldRemove](Classes/structllarp_1_1path_1_1Builder.md#function-shouldremove)**() const override<br>return true if we can and should remove this pathset and underlying resources from its parent context  |
| virtual llarp_time_t | **[Now](Classes/structllarp_1_1path_1_1Builder.md#function-now)**() const override<br>get time from event loop  |
| virtual void | **[Tick](Classes/structllarp_1_1path_1_1Builder.md#function-tick)**(llarp_time_t now) override<br>tick owned paths  |
| virtual void | **[BuildOne](Classes/structllarp_1_1path_1_1Builder.md#function-buildone)**(PathRole roles =ePathRoleAny) override |
| virtual bool | **[BuildOneAlignedTo](Classes/structllarp_1_1path_1_1Builder.md#function-buildonealignedto)**(const [RouterID](Classes/structllarp_1_1RouterID.md) endpoint) override |
| std::optional< std::vector< [RouterContact](Classes/structllarp_1_1RouterContact.md) > > | **[GetHopsAlignedToForBuild](Classes/structllarp_1_1path_1_1Builder.md#function-gethopsalignedtoforbuild)**([RouterID](Classes/structllarp_1_1RouterID.md) endpoint, const std::set< [RouterID](Classes/structllarp_1_1RouterID.md) > & exclude ={}) |
| virtual void | **[Build](Classes/structllarp_1_1path_1_1Builder.md#function-build)**(std::vector< [RouterContact](Classes/structllarp_1_1RouterContact.md) > hops, PathRole roles =ePathRoleAny) override<br>manual build on these hops  |
| std::optional< [RouterContact](Classes/structllarp_1_1RouterContact.md) > | **[SelectFirstHop](Classes/structllarp_1_1path_1_1Builder.md#function-selectfirsthop)**(const std::set< [RouterID](Classes/structllarp_1_1RouterID.md) > & exclude ={}) const<br>pick a first hop  |
| virtual std::optional< std::vector< [RouterContact](Classes/structllarp_1_1RouterContact.md) > > | **[GetHopsForBuild](Classes/structllarp_1_1path_1_1Builder.md#function-gethopsforbuild)**() override |
| void | **[ManualRebuild](Classes/structllarp_1_1path_1_1Builder.md#function-manualrebuild)**(size_t N, PathRole roles =ePathRoleAny) |
| virtual const [SecretKey](Classes/structllarp_1_1SecretKey.md) & | **[GetTunnelEncryptionSecretKey](Classes/structllarp_1_1path_1_1Builder.md#function-gettunnelencryptionsecretkey)**() const |
| virtual void | **[HandlePathBuilt](Classes/structllarp_1_1path_1_1Builder.md#function-handlepathbuilt)**(Path_ptr p) override |
| virtual void | **[HandlePathBuildTimeout](Classes/structllarp_1_1path_1_1Builder.md#function-handlepathbuildtimeout)**(Path_ptr p) override |
| virtual void | **[HandlePathBuildFailedAt](Classes/structllarp_1_1path_1_1Builder.md#function-handlepathbuildfailedat)**(Path_ptr p, [RouterID](Classes/structllarp_1_1RouterID.md) hop) override |

## Protected Functions

|                | Name           |
| -------------- | -------------- |
| virtual bool | **[UrgentBuild](Classes/structllarp_1_1path_1_1Builder.md#function-urgentbuild)**(llarp_time_t now) const |
| bool | **[BuildCooldownHit](Classes/structllarp_1_1path_1_1Builder.md#function-buildcooldownhit)**([RouterID](Classes/structllarp_1_1RouterID.md) edge) const<br>return true if we hit our soft limit for building paths too fast on a first hop  |

## Public Attributes

|                | Name           |
| -------------- | -------------- |
| [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) *const | **[m_router](Classes/structllarp_1_1path_1_1Builder.md#variable-m-router)**  |
| [SecretKey](Classes/structllarp_1_1SecretKey.md) | **[enckey](Classes/structllarp_1_1path_1_1Builder.md#variable-enckey)**  |
| size_t | **[numHops](Classes/structllarp_1_1path_1_1Builder.md#variable-numhops)**  |
| llarp_time_t | **[lastBuild](Classes/structllarp_1_1path_1_1Builder.md#variable-lastbuild)**  |
| llarp_time_t | **[buildIntervalLimit](Classes/structllarp_1_1path_1_1Builder.md#variable-buildintervallimit)**  |

## Protected Attributes

|                | Name           |
| -------------- | -------------- |
| std::atomic< bool > | **[_run](Classes/structllarp_1_1path_1_1Builder.md#variable--run)** <br>flag for [PathSet::Stop()]() |

## Additional inherited members

**Protected Types inherited from [llarp::path::PathSet](Classes/structllarp_1_1path_1_1PathSet.md)**

|                | 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 inherited from [llarp::path::PathSet](Classes/structllarp_1_1path_1_1PathSet.md)**

|                | 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  |
| 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 | **[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 std::string | **[Name](Classes/structllarp_1_1path_1_1PathSet.md#function-name)**() const =0<br>get the "name" of this pathset  |
| 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 | **[SendPacketToRemote](Classes/structllarp_1_1path_1_1PathSet.md#function-sendpackettoremote)**(const [llarp_buffer_t](Classes/structllarp__buffer__t.md) & pkt, service::ProtocolType t) =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 inherited from [llarp::path::PathSet](Classes/structllarp_1_1path_1_1PathSet.md)**

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

**Public Attributes inherited from [llarp::path::PathSet](Classes/structllarp_1_1path_1_1PathSet.md)**

|                | 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 inherited from [llarp::path::PathSet](Classes/structllarp_1_1path_1_1PathSet.md)**

|                | 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)**  |


## Public Functions Documentation

### function Builder

```cpp
Builder(
    AbstractRouter * p_router,
    size_t numDesiredPaths,
    size_t numHops
)
```

construct 

### function ~Builder

```cpp
virtual ~Builder() =default
```


### function ExtractStatus

```cpp
util::StatusObject ExtractStatus() const
```


### function ShouldBuildMore

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

return true if we should build another path 

**Reimplements**: [llarp::path::PathSet::ShouldBuildMore](Classes/structllarp_1_1path_1_1PathSet.md#function-shouldbuildmore)


**Reimplemented by**: [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 ShouldBundleRC

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

should we bundle RCs in builds? 

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


### function ResetInternalState

```cpp
virtual void ResetInternalState() override
```

reset all cooldown timers 

**Reimplements**: [llarp::path::PathSet::ResetInternalState](Classes/structllarp_1_1path_1_1PathSet.md#function-resetinternalstate)


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


### function BuildCooldownHit

```cpp
bool BuildCooldownHit(
    llarp_time_t now
) const
```

return true if we hit our soft limit for building paths too fast 

### function GetRoles

```cpp
inline virtual PathRole GetRoles() const
```

get roles for this path builder 

**Reimplemented by**: [llarp::exit::BaseSession::GetRoles](Classes/structllarp_1_1exit_1_1BaseSession.md#function-getroles)


### function CurrentBuildStats

```cpp
inline BuildStats CurrentBuildStats() const
```


### function Stop

```cpp
virtual bool Stop() override
```

stop this pathset and mark it as to be removed 

**Reimplements**: [llarp::path::PathSet::Stop](Classes/structllarp_1_1path_1_1PathSet.md#function-stop)


**Reimplemented by**: [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 override
```

return true if we are stopped 

**Reimplements**: [llarp::path::PathSet::IsStopped](Classes/structllarp_1_1path_1_1PathSet.md#function-isstopped)


### function ShouldRemove

```cpp
virtual bool ShouldRemove() const override
```

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

**Reimplements**: [llarp::path::PathSet::ShouldRemove](Classes/structllarp_1_1path_1_1PathSet.md#function-shouldremove)


### function Now

```cpp
virtual llarp_time_t Now() const override
```

get time from event loop 

**Reimplements**: [llarp::path::PathSet::Now](Classes/structllarp_1_1path_1_1PathSet.md#function-now)


### function Tick

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

tick owned paths 

**Reimplements**: [llarp::path::PathSet::Tick](Classes/structllarp_1_1path_1_1PathSet.md#function-tick)


**Reimplemented by**: [llarp::handlers::TunEndpoint::Tick](Classes/structllarp_1_1handlers_1_1TunEndpoint.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 BuildOne

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


**Reimplements**: [llarp::path::PathSet::BuildOne](Classes/structllarp_1_1path_1_1PathSet.md#function-buildone)


### function BuildOneAlignedTo

```cpp
virtual bool BuildOneAlignedTo(
    const RouterID endpoint
) override
```


**Reimplements**: [llarp::path::PathSet::BuildOneAlignedTo](Classes/structllarp_1_1path_1_1PathSet.md#function-buildonealignedto)


### function GetHopsAlignedToForBuild

```cpp
std::optional< std::vector< RouterContact > > GetHopsAlignedToForBuild(
    RouterID endpoint,
    const std::set< RouterID > & exclude ={}
)
```


### function Build

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

manual build on these hops 

**Reimplements**: [llarp::path::PathSet::Build](Classes/structllarp_1_1path_1_1PathSet.md#function-build)


### function SelectFirstHop

```cpp
std::optional< RouterContact > SelectFirstHop(
    const std::set< RouterID > & exclude ={}
) const
```

pick a first hop 

### function GetHopsForBuild

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


**Reimplements**: [llarp::path::PathSet::GetHopsForBuild](Classes/structllarp_1_1path_1_1PathSet.md#function-gethopsforbuild)


**Reimplemented by**: [llarp::exit::BaseSession::GetHopsForBuild](Classes/structllarp_1_1exit_1_1BaseSession.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 ManualRebuild

```cpp
void ManualRebuild(
    size_t N,
    PathRole roles =ePathRoleAny
)
```


### function GetTunnelEncryptionSecretKey

```cpp
virtual const SecretKey & GetTunnelEncryptionSecretKey() const
```


### function HandlePathBuilt

```cpp
virtual void HandlePathBuilt(
    Path_ptr p
) override
```


**Reimplements**: [llarp::path::PathSet::HandlePathBuilt](Classes/structllarp_1_1path_1_1PathSet.md#function-handlepathbuilt)


**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)


### function HandlePathBuildTimeout

```cpp
virtual void HandlePathBuildTimeout(
    Path_ptr p
) override
```


**Reimplements**: [llarp::path::PathSet::HandlePathBuildTimeout](Classes/structllarp_1_1path_1_1PathSet.md#function-handlepathbuildtimeout)


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


### function HandlePathBuildFailedAt

```cpp
virtual void HandlePathBuildFailedAt(
    Path_ptr p,
    RouterID hop
) override
```


**Reimplements**: [llarp::path::PathSet::HandlePathBuildFailedAt](Classes/structllarp_1_1path_1_1PathSet.md#function-handlepathbuildfailedat)


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


## Protected Functions Documentation

### function UrgentBuild

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


**Reimplemented by**: [llarp::exit::BaseSession::UrgentBuild](Classes/structllarp_1_1exit_1_1BaseSession.md#function-urgentbuild)


### function BuildCooldownHit

```cpp
bool BuildCooldownHit(
    RouterID edge
) const
```

return true if we hit our soft limit for building paths too fast on a first hop 

## Public Attributes Documentation

### variable m_router

```cpp
AbstractRouter *const m_router;
```


### variable enckey

```cpp
SecretKey enckey;
```


### variable numHops

```cpp
size_t numHops;
```


### variable lastBuild

```cpp
llarp_time_t lastBuild = 0s;
```


### variable buildIntervalLimit

```cpp
llarp_time_t buildIntervalLimit = MIN_PATH_BUILD_INTERVAL;
```


## Protected Attributes Documentation

### variable _run

```cpp
std::atomic< bool > _run;
```

flag for [PathSet::Stop()]()

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

Updated on 2023-01-20 at 23:19:39 +0000