---
title: llarp/layers/flow/flow_state.hpp

---

# llarp/layers/flow/flow_state.hpp



## Namespaces

| Name           |
| -------------- |
| **[llarp](Namespaces/namespacellarp.md)** <br>[crypto.hpp] |
| **[llarp::layers](Namespaces/namespacellarp_1_1layers.md)**  |
| **[llarp::layers::flow](Namespaces/namespacellarp_1_1layers_1_1flow.md)**  |

## Classes

|                | Name           |
| -------------- | -------------- |
| struct | **[llarp::layers::flow::FlowStateInfo](Classes/structllarp_1_1layers_1_1flow_1_1FlowStateInfo.md)** <br>immutable snapshot of a flow's state.  |
| class | **[llarp::layers::flow::FlowState](Classes/classllarp_1_1layers_1_1flow_1_1FlowState.md)** <br>internal state of a flow on the flow layer.  |




## Source code

```cpp
#pragma once

#include <memory>
#include "flow_auth.hpp"

namespace llarp::layers::flow
{

  struct FlowState_Pimpl;

  struct FlowStateInfo
  {
    explicit FlowStateInfo(const FlowState_Pimpl&);

    bool
    paths_aligned() const;

    bool
    requires_authentication() const;


    FlowAuthPhase
    auth_phase() const;

    bool
    established() const;
  };
  class FlowState
  {
    std::shared_ptr<FlowState_Pimpl> _pimpl;

   public:
    explicit FlowState(FlowState_Pimpl*);
    FlowState(const FlowState&) = delete;
    FlowState(FlowState&&) = delete;
    FlowStateInfo
    current() const;
  };

}  // namespace llarp::layers::flow
```


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

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