---
title: llarp::layers::flow::FlowLayer
summary: flow layer's context that holds all the things in the flow layer 

---

# llarp::layers::flow::FlowLayer



flow layer's context that holds all the things in the flow layer 


`#include <flow_layer.hpp>`

## Public Functions

|                | Name           |
| -------------- | -------------- |
| | **[FlowLayer](Classes/classllarp_1_1layers_1_1flow_1_1FlowLayer.md#function-flowlayer)**([AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) & , [NetworkConfig](Classes/structllarp_1_1NetworkConfig.md) ) |
| | **[~FlowLayer](Classes/classllarp_1_1layers_1_1flow_1_1FlowLayer.md#function-~flowlayer)**() |
| | **[FlowLayer](Classes/classllarp_1_1layers_1_1flow_1_1FlowLayer.md#function-flowlayer)**(const [FlowLayer](Classes/classllarp_1_1layers_1_1flow_1_1FlowLayer.md) & ) =delete |
| | **[FlowLayer](Classes/classllarp_1_1layers_1_1flow_1_1FlowLayer.md#function-flowlayer)**([FlowLayer](Classes/classllarp_1_1layers_1_1flow_1_1FlowLayer.md) && ) =delete |
| [FlowStats](Classes/structllarp_1_1layers_1_1flow_1_1FlowStats.md) | **[current_stats](Classes/classllarp_1_1layers_1_1flow_1_1FlowLayer.md#function-current-stats)**() const<br>get flow layer's informational stats at this moment in time.  |
| bool | **[has_flow](Classes/classllarp_1_1layers_1_1flow_1_1FlowLayer.md#function-has-flow)**(const [flow::FlowInfo](Classes/structllarp_1_1layers_1_1flow_1_1FlowInfo.md) & flow_info) const<br>return true if we have this flow.  |
| void | **[remove_flow](Classes/classllarp_1_1layers_1_1flow_1_1FlowLayer.md#function-remove-flow)**(const [flow::FlowInfo](Classes/structllarp_1_1layers_1_1flow_1_1FlowInfo.md) & flow_info) |
| [FlowAddr](Classes/classllarp_1_1layers_1_1flow_1_1FlowAddr.md) | **[local_addr](Classes/classllarp_1_1layers_1_1flow_1_1FlowLayer.md#function-local-addr)**() const |
| std::shared_ptr< [service::Endpoint](Classes/structllarp_1_1service_1_1Endpoint.md) > | **[local_deprecated_loki_endpoint](Classes/classllarp_1_1layers_1_1flow_1_1FlowLayer.md#function-local-deprecated-loki-endpoint)**() const<br>get our endpointbase for our local "us"  |
| std::shared_ptr< [FlowIdentity](Classes/classllarp_1_1layers_1_1flow_1_1FlowIdentity.md) > | **[flow_to](Classes/classllarp_1_1layers_1_1flow_1_1FlowLayer.md#function-flow-to)**(const [FlowAddr](Classes/classllarp_1_1layers_1_1flow_1_1FlowAddr.md) & to)<br>autovivify a flow to a remote.  |
| std::vector< [FlowTraffic](Classes/structllarp_1_1layers_1_1flow_1_1FlowTraffic.md) > | **[poll_flow_traffic](Classes/classllarp_1_1layers_1_1flow_1_1FlowLayer.md#function-poll-flow-traffic)**()<br>pop off all flow layer traffic that we have processed.  |
| void | **[offer_flow_traffic](Classes/classllarp_1_1layers_1_1flow_1_1FlowLayer.md#function-offer-flow-traffic)**([FlowTraffic](Classes/structllarp_1_1layers_1_1flow_1_1FlowTraffic.md) && traff)<br>synthetically inject flow layer traffic into the flow layer  |
| void | **[start](Classes/classllarp_1_1layers_1_1flow_1_1FlowLayer.md#function-start)**() |
| void | **[stop](Classes/classllarp_1_1layers_1_1flow_1_1FlowLayer.md#function-stop)**() |

## Public Attributes

|                | Name           |
| -------------- | -------------- |
| [NameResolver](Classes/classllarp_1_1layers_1_1flow_1_1NameResolver.md) | **[name_resolver](Classes/classllarp_1_1layers_1_1flow_1_1FlowLayer.md#variable-name-resolver)**  |
| [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) & | **[router](Classes/classllarp_1_1layers_1_1flow_1_1FlowLayer.md#variable-router)**  |

## Public Functions Documentation

### function FlowLayer

```cpp
FlowLayer(
    AbstractRouter & ,
    NetworkConfig 
)
```


### function ~FlowLayer

```cpp
~FlowLayer()
```


### function FlowLayer

```cpp
FlowLayer(
    const FlowLayer & 
) =delete
```


### function FlowLayer

```cpp
FlowLayer(
    FlowLayer && 
) =delete
```


### function current_stats

```cpp
FlowStats current_stats() const
```

get flow layer's informational stats at this moment in time. 

### function has_flow

```cpp
bool has_flow(
    const flow::FlowInfo & flow_info
) const
```

return true if we have this flow. 

### function remove_flow

```cpp
void remove_flow(
    const flow::FlowInfo & flow_info
)
```


### function local_addr

```cpp
inline FlowAddr local_addr() const
```


### function local_deprecated_loki_endpoint

```cpp
std::shared_ptr< service::Endpoint > local_deprecated_loki_endpoint() const
```

get our endpointbase for our local "us" 

### function flow_to

```cpp
std::shared_ptr< FlowIdentity > flow_to(
    const FlowAddr & to
)
```

autovivify a flow to a remote. 

### function poll_flow_traffic

```cpp
std::vector< FlowTraffic > poll_flow_traffic()
```

pop off all flow layer traffic that we have processed. 

### function offer_flow_traffic

```cpp
void offer_flow_traffic(
    FlowTraffic && traff
)
```

synthetically inject flow layer traffic into the flow layer 

### function start

```cpp
void start()
```


### function stop

```cpp
void stop()
```


## Public Attributes Documentation

### variable name_resolver

```cpp
NameResolver name_resolver;
```


### variable router

```cpp
AbstractRouter & router;
```


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

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