---
title: llarp::RCGossiper

---

# llarp::RCGossiper





Inherits from [llarp::I_RCGossiper](Classes/structllarp_1_1I__RCGossiper.md)

## Public Functions

|                | Name           |
| -------------- | -------------- |
| | **[RCGossiper](Classes/structllarp_1_1RCGossiper.md#function-rcgossiper)**() |
| | **[~RCGossiper](Classes/structllarp_1_1RCGossiper.md#function-~rcgossiper)**() override =default |
| virtual bool | **[GossipRC](Classes/structllarp_1_1RCGossiper.md#function-gossiprc)**(const [RouterContact](Classes/structllarp_1_1RouterContact.md) & rc) override<br>try goissping RC return false if we hit a cooldown for this rc return true if we gossiped this rc to at least 1 peer  |
| virtual void | **[Decay](Classes/structllarp_1_1RCGossiper.md#function-decay)**(Time_t now) override |
| virtual bool | **[ShouldGossipOurRC](Classes/structllarp_1_1RCGossiper.md#function-shouldgossipourrc)**(Time_t now) const override<br>return true if we should gossip our RC now  |
| virtual bool | **[IsOurRC](Classes/structllarp_1_1RCGossiper.md#function-isourrc)**(const [RouterContact](Classes/structllarp_1_1RouterContact.md) & rc) const override<br>return true if that rc is owned by us  |
| void | **[Init](Classes/structllarp_1_1RCGossiper.md#function-init)**([ILinkManager](Classes/structllarp_1_1ILinkManager.md) * , const [RouterID](Classes/structllarp_1_1RouterID.md) & , [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * ) |
| virtual void | **[Forget](Classes/structllarp_1_1RCGossiper.md#function-forget)**(const [RouterID](Classes/structllarp_1_1RouterID.md) & router) override<br>forget the replay filter entry given pubkey  |
| virtual TimePoint_t | **[NextGossipAt](Classes/structllarp_1_1RCGossiper.md#function-nextgossipat)**() const override<br>returns the time point when we will send our next gossip at  |
| virtual std::optional< TimePoint_t > | **[LastGossipAt](Classes/structllarp_1_1RCGossiper.md#function-lastgossipat)**() const override<br>returns the time point when we sent our last gossip at or nullopt if we never did  |

## Additional inherited members

**Public Types inherited from [llarp::I_RCGossiper](Classes/structllarp_1_1I__RCGossiper.md)**

|                | Name           |
| -------------- | -------------- |
| using Duration_t | **[Time_t](Classes/structllarp_1_1I__RCGossiper.md#using-time-t)**  |

**Public Functions inherited from [llarp::I_RCGossiper](Classes/structllarp_1_1I__RCGossiper.md)**

|                | Name           |
| -------------- | -------------- |
| virtual | **[~I_RCGossiper](Classes/structllarp_1_1I__RCGossiper.md#function-~i-rcgossiper)**() =default |


## Public Functions Documentation

### function RCGossiper

```cpp
RCGossiper()
```


### function ~RCGossiper

```cpp
~RCGossiper() override =default
```


### function GossipRC

```cpp
virtual bool GossipRC(
    const RouterContact & rc
) override
```

try goissping RC return false if we hit a cooldown for this rc return true if we gossiped this rc to at least 1 peer 

**Reimplements**: [llarp::I_RCGossiper::GossipRC](Classes/structllarp_1_1I__RCGossiper.md#function-gossiprc)


### function Decay

```cpp
virtual void Decay(
    Time_t now
) override
```


**Reimplements**: [llarp::I_RCGossiper::Decay](Classes/structllarp_1_1I__RCGossiper.md#function-decay)


### function ShouldGossipOurRC

```cpp
virtual bool ShouldGossipOurRC(
    Time_t now
) const override
```

return true if we should gossip our RC now 

**Reimplements**: [llarp::I_RCGossiper::ShouldGossipOurRC](Classes/structllarp_1_1I__RCGossiper.md#function-shouldgossipourrc)


### function IsOurRC

```cpp
virtual bool IsOurRC(
    const RouterContact & rc
) const override
```

return true if that rc is owned by us 

**Reimplements**: [llarp::I_RCGossiper::IsOurRC](Classes/structllarp_1_1I__RCGossiper.md#function-isourrc)


### function Init

```cpp
void Init(
    ILinkManager * ,
    const RouterID & ,
    AbstractRouter * 
)
```


### function Forget

```cpp
virtual void Forget(
    const RouterID & router
) override
```

forget the replay filter entry given pubkey 

**Reimplements**: [llarp::I_RCGossiper::Forget](Classes/structllarp_1_1I__RCGossiper.md#function-forget)


### function NextGossipAt

```cpp
virtual TimePoint_t NextGossipAt() const override
```

returns the time point when we will send our next gossip at 

**Reimplements**: [llarp::I_RCGossiper::NextGossipAt](Classes/structllarp_1_1I__RCGossiper.md#function-nextgossipat)


### function LastGossipAt

```cpp
virtual std::optional< TimePoint_t > LastGossipAt() const override
```

returns the time point when we sent our last gossip at or nullopt if we never did 

**Reimplements**: [llarp::I_RCGossiper::LastGossipAt](Classes/structllarp_1_1I__RCGossiper.md#function-lastgossipat)


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

Updated on 2023-01-09 at 16:43:38 +0000