---
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)**(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, [llarp::handlers::ExitEndpoint](Classes/structllarp_1_1handlers_1_1ExitEndpoint.md) * parent) |
| | **[~Endpoint](Classes/structllarp_1_1exit_1_1Endpoint.md#function-~endpoint)**() |
| 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 | **[QueueInboundTraffic](Classes/structllarp_1_1exit_1_1Endpoint.md#function-queueinboundtraffic)**(std::vector< byte_t > data, service::ProtocolType t)<br>queue traffic from service node / internet to be transmitted  |
| bool | **[Flush](Classes/structllarp_1_1exit_1_1Endpoint.md#function-flush)**()<br>flush inbound and outbound traffic queues  |
| bool | **[QueueOutboundTraffic](Classes/structllarp_1_1exit_1_1Endpoint.md#function-queueoutboundtraffic)**([PathID_t](Classes/structllarp_1_1PathID__t.md) txid, std::vector< byte_t > data, uint64_t counter, service::ProtocolType t)<br>queue outbound traffic does ip rewrite here  |
| bool | **[UpdateLocalPath](Classes/structllarp_1_1exit_1_1Endpoint.md#function-updatelocalpath)**(const [llarp::PathID_t](Classes/structllarp_1_1PathID__t.md) & nextPath)<br>update local path id and cascade information to parent return true if success  |
| 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
explicit Endpoint(
    const llarp::PubKey & remoteIdent,
    const llarp::path::HopHandler_ptr & path,
    bool rewriteIP,
    huint128_t ip,
    llarp::handlers::ExitEndpoint * parent
)
```


### function ~Endpoint

```cpp
~Endpoint()
```


### 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 QueueInboundTraffic

```cpp
bool QueueInboundTraffic(
    std::vector< byte_t > data,
    service::ProtocolType t
)
```

queue traffic from service node / internet to be transmitted 

### function Flush

```cpp
bool Flush()
```

flush inbound and outbound traffic queues 

### function QueueOutboundTraffic

```cpp
bool QueueOutboundTraffic(
    PathID_t txid,
    std::vector< byte_t > data,
    uint64_t counter,
    service::ProtocolType t
)
```

queue outbound traffic does ip rewrite here 

### function UpdateLocalPath

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

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 2022-10-26 at 17:18:03 +0000