---
title: llarp::exit::Endpoint
summary: persistant exit state for 1 identity on the exit node 

---

# llarp::exit::Endpoint



persistant exit state for 1 identity on the exit node 


`#include <endpoint.hpp>`

## Public Functions

|                | Name           |
| -------------- | -------------- |
| | **[Endpoint](Classes/structllarp_1_1exit_1_1Endpoint.md#function-endpoint)**([AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) & router, const [llarp::PubKey](Classes/structllarp_1_1PubKey.md) & remoteIdent, const llarp::path::HopHandler_ptr & path, bool rewriteIP, [huint128_t](Classes/structllarp_1_1huint__t.md) ip) |
| void | **[Close](Classes/structllarp_1_1exit_1_1Endpoint.md#function-close)**()<br>close ourselves  |
| util::StatusObject | **[ExtractStatus](Classes/structllarp_1_1exit_1_1Endpoint.md#function-extractstatus)**() const<br>implement istateful  |
| bool | **[IsExpired](Classes/structllarp_1_1exit_1_1Endpoint.md#function-isexpired)**(llarp_time_t now) const<br>return true if we are expired right now  |
| bool | **[ExpiresSoon](Classes/structllarp_1_1exit_1_1Endpoint.md#function-expiressoon)**(llarp_time_t now, llarp_time_t dlt =5s) const |
| bool | **[LooksDead](Classes/structllarp_1_1exit_1_1Endpoint.md#function-looksdead)**(llarp_time_t now, llarp_time_t timeout =10s) const<br>return true if this endpoint looks dead right now  |
| void | **[Tick](Classes/structllarp_1_1exit_1_1Endpoint.md#function-tick)**(llarp_time_t now)<br>tick ourself, reset tx/rx rates  |
| bool | **[UpdateLocalPath](Classes/structllarp_1_1exit_1_1Endpoint.md#function-updatelocalpath)**(const [llarp::PathID_t](Classes/structllarp_1_1PathID__t.md) & nextPath)<br>queue traffic from service node / internet to be transmitted  |
| llarp::path::HopHandler_ptr | **[GetCurrentPath](Classes/structllarp_1_1exit_1_1Endpoint.md#function-getcurrentpath)**() const |
| const [llarp::PubKey](Classes/structllarp_1_1PubKey.md) & | **[PubKey](Classes/structllarp_1_1exit_1_1Endpoint.md#function-pubkey)**() const |
| uint64_t | **[TxRate](Classes/structllarp_1_1exit_1_1Endpoint.md#function-txrate)**() const |
| uint64_t | **[RxRate](Classes/structllarp_1_1exit_1_1Endpoint.md#function-rxrate)**() const |
| [huint128_t](Classes/structllarp_1_1huint__t.md) | **[LocalIP](Classes/structllarp_1_1exit_1_1Endpoint.md#function-localip)**() const |

## Public Attributes

|                | Name           |
| -------------- | -------------- |
| constexpr size_t | **[MaxUpstreamQueueSize](Classes/structllarp_1_1exit_1_1Endpoint.md#variable-maxupstreamqueuesize)**  |
| const llarp_time_t | **[createdAt](Classes/structllarp_1_1exit_1_1Endpoint.md#variable-createdat)**  |

## Public Functions Documentation

### function Endpoint

```cpp
Endpoint(
    AbstractRouter & router,
    const llarp::PubKey & remoteIdent,
    const llarp::path::HopHandler_ptr & path,
    bool rewriteIP,
    huint128_t ip
)
```


### function Close

```cpp
void Close()
```

close ourselves 

### function ExtractStatus

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

implement istateful 

### function IsExpired

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

return true if we are expired right now 

### function ExpiresSoon

```cpp
bool ExpiresSoon(
    llarp_time_t now,
    llarp_time_t dlt =5s
) const
```


### function LooksDead

```cpp
bool LooksDead(
    llarp_time_t now,
    llarp_time_t timeout =10s
) const
```

return true if this endpoint looks dead right now 

### function Tick

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

tick ourself, reset tx/rx rates 

### function UpdateLocalPath

```cpp
bool UpdateLocalPath(
    const llarp::PathID_t & nextPath
)
```

queue traffic from service node / internet to be transmitted 

flush inbound and outbound traffic queues queue outbound traffic on tun does ip rewrite here update local path id and cascade information to parent return true if success 


### function GetCurrentPath

```cpp
inline llarp::path::HopHandler_ptr GetCurrentPath() const
```


### function PubKey

```cpp
inline const llarp::PubKey & PubKey() const
```


### function TxRate

```cpp
inline uint64_t TxRate() const
```


### function RxRate

```cpp
inline uint64_t RxRate() const
```


### function LocalIP

```cpp
inline huint128_t LocalIP() const
```


## Public Attributes Documentation

### variable MaxUpstreamQueueSize

```cpp
static constexpr size_t MaxUpstreamQueueSize = 256;
```


### variable createdAt

```cpp
const llarp_time_t createdAt;
```


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

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