---
title: llarp::layers::flow::FlowIdentity
summary: the local end of a one to one flow to a remote given a flow isolation metric (flow_tag) flows do not change their source/destination address but may change their flow tag/convo tag. 

---

# llarp::layers::flow::FlowIdentity



the local end of a one to one flow to a remote given a flow isolation metric (flow_tag) flows do not change their source/destination address but may change their flow tag/convo tag.  [More...](#detailed-description)


`#include <flow_identity.hpp>`

## Public Functions

|                | Name           |
| -------------- | -------------- |
| | **[FlowIdentity](Classes/classllarp_1_1layers_1_1flow_1_1FlowIdentity.md#function-flowidentity)**(const [FlowIdentity](Classes/classllarp_1_1layers_1_1flow_1_1FlowIdentity.md) & ) =delete |
| | **[FlowIdentity](Classes/classllarp_1_1layers_1_1flow_1_1FlowIdentity.md#function-flowidentity)**([FlowIdentity](Classes/classllarp_1_1layers_1_1flow_1_1FlowIdentity.md) && ) =delete |
| | **[FlowIdentity](Classes/classllarp_1_1layers_1_1flow_1_1FlowIdentity.md#function-flowidentity)**([FlowLayer](Classes/classllarp_1_1layers_1_1flow_1_1FlowLayer.md) & parent, [FlowAddr](Classes/classllarp_1_1layers_1_1flow_1_1FlowAddr.md) remote_addr, const [FlowIdentityPrivateKeys](Classes/structllarp_1_1layers_1_1flow_1_1FlowIdentityPrivateKeys.md) & local_keys) |
| void | **[async_ensure_flow](Classes/classllarp_1_1layers_1_1flow_1_1FlowIdentity.md#function-async-ensure-flow)**([FlowEstablish](Classes/classllarp_1_1layers_1_1flow_1_1FlowEstablish.md) handshaker)<br>ensure we have a flow to the remote endpoint.  |
| void | **[send_to_remote](Classes/classllarp_1_1layers_1_1flow_1_1FlowIdentity.md#function-send-to-remote)**(std::vector< byte_t > dataum, FlowDataKind kind)<br>send flow traffic to the remote.  |
| void | **[update_flow_tags](Classes/classllarp_1_1layers_1_1flow_1_1FlowIdentity.md#function-update-flow-tags)**(const std::set< [flow::FlowTag](Classes/structllarp_1_1layers_1_1flow_1_1FlowTag.md) > & tag)<br>call this to update the flow tags we are using.  |
| void | **[prune_flow_tags](Classes/classllarp_1_1layers_1_1flow_1_1FlowIdentity.md#function-prune-flow-tags)**()<br>remove all expired flow tags  |
| bool | **[operator==](Classes/classllarp_1_1layers_1_1flow_1_1FlowIdentity.md#function-operator==)**(const [FlowIdentity](Classes/classllarp_1_1layers_1_1flow_1_1FlowIdentity.md) & other) const |

## Public Attributes

|                | Name           |
| -------------- | -------------- |
| const [FlowInfo](Classes/structllarp_1_1layers_1_1flow_1_1FlowInfo.md) & | **[flow_info](Classes/classllarp_1_1layers_1_1flow_1_1FlowIdentity.md#variable-flow-info)** <br>holds the local/remote flow layer address and any flow isolation metric  |
| const [FlowState](Classes/classllarp_1_1layers_1_1flow_1_1FlowState.md) & | **[state](Classes/classllarp_1_1layers_1_1flow_1_1FlowIdentity.md#variable-state)**  |

## Protected Attributes

|                | Name           |
| -------------- | -------------- |
| [FlowInfo](Classes/structllarp_1_1layers_1_1flow_1_1FlowInfo.md) | **[_flow_info](Classes/classllarp_1_1layers_1_1flow_1_1FlowIdentity.md#variable--flow-info)**  |

## Friends

|                | Name           |
| -------------- | -------------- |
| struct | **[deprecated_path_ensure_handler](Classes/classllarp_1_1layers_1_1flow_1_1FlowIdentity.md#friend-deprecated-path-ensure-handler)**  |

## Detailed Description

```cpp
class llarp::layers::flow::FlowIdentity;
```

the local end of a one to one flow to a remote given a flow isolation metric (flow_tag) flows do not change their source/destination address but may change their flow tag/convo tag. 

note: historically path handovers were allowed, but going forward this is discontinued. 

## Public Functions Documentation

### function FlowIdentity

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


### function FlowIdentity

```cpp
FlowIdentity(
    FlowIdentity && 
) =delete
```


### function FlowIdentity

```cpp
FlowIdentity(
    FlowLayer & parent,
    FlowAddr remote_addr,
    const FlowIdentityPrivateKeys & local_keys
)
```


### function async_ensure_flow

```cpp
void async_ensure_flow(
    FlowEstablish handshaker
)
```

ensure we have a flow to the remote endpoint. 

pass in a handshaker to do any additional steps after establishment. 


### function send_to_remote

```cpp
void send_to_remote(
    std::vector< byte_t > dataum,
    FlowDataKind kind
)
```

send flow traffic to the remote. 

### function update_flow_tags

```cpp
void update_flow_tags(
    const std::set< flow::FlowTag > & tag
)
```

call this to update the flow tags we are using. 

### function prune_flow_tags

```cpp
void prune_flow_tags()
```

remove all expired flow tags 

### function operator==

```cpp
bool operator==(
    const FlowIdentity & other
) const
```


## Public Attributes Documentation

### variable flow_info

```cpp
const FlowInfo & flow_info {_flow_info};
```

holds the local/remote flow layer address and any flow isolation metric 

### variable state

```cpp
const FlowState & state {_state};
```


## Protected Attributes Documentation

### variable _flow_info

```cpp
FlowInfo _flow_info;
```


## Friends

### friend deprecated_path_ensure_handler

```cpp
friend struct deprecated_path_ensure_handler(
    deprecated_path_ensure_handler 
);
```


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

Updated on 2023-04-27 at 04:17:17 +0000