---
title: llarp/router/i_gossiper.hpp

---

# llarp/router/i_gossiper.hpp



## Namespaces

| Name           |
| -------------- |
| **[llarp](Namespaces/namespacellarp.md)** <br>[crypto.hpp] |

## Classes

|                | Name           |
| -------------- | -------------- |
| struct | **[llarp::I_RCGossiper](Classes/structllarp_1_1I__RCGossiper.md)**  |




## Source code

```cpp
#pragma once
#include <llarp/router_contact.hpp>
#include <llarp/util/time.hpp>
#include <optional>

namespace llarp
{
  constexpr size_t MaxGossipPeers = 20;

  struct I_RCGossiper
  {
    virtual ~I_RCGossiper() = default;
    virtual bool
    GossipRC(const RouterContact& rc) = 0;

    using Time_t = Duration_t;

    virtual void
    Decay(Time_t now) = 0;

    virtual bool
    ShouldGossipOurRC(Time_t now) const = 0;

    virtual bool
    IsOurRC(const RouterContact& rc) const = 0;

    virtual void
    Forget(const RouterID& router) = 0;

    virtual TimePoint_t
    NextGossipAt() const = 0;

    virtual std::optional<TimePoint_t>
    LastGossipAt() const = 0;
  };
}  // namespace llarp
```


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

Updated on 2022-09-01 at 18:16:54 +0000
