---
title: llarp::dht::RelayedFindRouterMessage
summary: variant of FindRouterMessage relayed via path 

---

# llarp::dht::RelayedFindRouterMessage



variant of [FindRouterMessage](Classes/structllarp_1_1dht_1_1FindRouterMessage.md) relayed via path 


`#include <findrouter.hpp>`

Inherits from [llarp::dht::FindRouterMessage](Classes/structllarp_1_1dht_1_1FindRouterMessage.md), [llarp::dht::IMessage](Classes/structllarp_1_1dht_1_1IMessage.md)

## Public Functions

|                | Name           |
| -------------- | -------------- |
| | **[RelayedFindRouterMessage](Classes/structllarp_1_1dht_1_1RelayedFindRouterMessage.md#function-relayedfindroutermessage)**(const [Key_t](Classes/structllarp_1_1dht_1_1Key__t.md) & from) |
| virtual bool | **[HandleMessage](Classes/structllarp_1_1dht_1_1RelayedFindRouterMessage.md#function-handlemessage)**([llarp_dht_context](Classes/structllarp__dht__context.md) * ctx, std::vector< IMessage::Ptr_t > & replies) const override<br>handle a relayed [FindRouterMessage](Classes/structllarp_1_1dht_1_1FindRouterMessage.md), do a lookup on the dht and inform the path of the result TODO: smart path expiration logic needs to be implemented  |

## Additional inherited members

**Public Functions inherited from [llarp::dht::FindRouterMessage](Classes/structllarp_1_1dht_1_1FindRouterMessage.md)**

|                | Name           |
| -------------- | -------------- |
| | **[FindRouterMessage](Classes/structllarp_1_1dht_1_1FindRouterMessage.md#function-findroutermessage)**(const [Key_t](Classes/structllarp_1_1dht_1_1Key__t.md) & from) |
| | **[FindRouterMessage](Classes/structllarp_1_1dht_1_1FindRouterMessage.md#function-findroutermessage)**(uint64_t id, const [RouterID](Classes/structllarp_1_1RouterID.md) & target) |
| | **[FindRouterMessage](Classes/structllarp_1_1dht_1_1FindRouterMessage.md#function-findroutermessage)**(uint64_t id) |
| | **[~FindRouterMessage](Classes/structllarp_1_1dht_1_1FindRouterMessage.md#function-~findroutermessage)**() override |
| virtual bool | **[BEncode](Classes/structllarp_1_1dht_1_1FindRouterMessage.md#function-bencode)**([llarp_buffer_t](Classes/structllarp__buffer__t.md) * buf) const override |
| virtual bool | **[DecodeKey](Classes/structllarp_1_1dht_1_1FindRouterMessage.md#function-decodekey)**(const [llarp_buffer_t](Classes/structllarp__buffer__t.md) & key, [llarp_buffer_t](Classes/structllarp__buffer__t.md) * val) override |

**Public Attributes inherited from [llarp::dht::FindRouterMessage](Classes/structllarp_1_1dht_1_1FindRouterMessage.md)**

|                | Name           |
| -------------- | -------------- |
| [RouterID](Classes/structllarp_1_1RouterID.md) | **[targetKey](Classes/structllarp_1_1dht_1_1FindRouterMessage.md#variable-targetkey)**  |
| bool | **[iterative](Classes/structllarp_1_1dht_1_1FindRouterMessage.md#variable-iterative)**  |
| bool | **[exploritory](Classes/structllarp_1_1dht_1_1FindRouterMessage.md#variable-exploritory)**  |
| uint64_t | **[txid](Classes/structllarp_1_1dht_1_1FindRouterMessage.md#variable-txid)**  |
| uint64_t | **[version](Classes/structllarp_1_1dht_1_1FindRouterMessage.md#variable-version)**  |

**Public Types inherited from [llarp::dht::IMessage](Classes/structllarp_1_1dht_1_1IMessage.md)**

|                | Name           |
| -------------- | -------------- |
| using std::unique_ptr< [IMessage](Classes/structllarp_1_1dht_1_1IMessage.md) > | **[Ptr_t](Classes/structllarp_1_1dht_1_1IMessage.md#using-ptr-t)**  |

**Public Functions inherited from [llarp::dht::IMessage](Classes/structllarp_1_1dht_1_1IMessage.md)**

|                | Name           |
| -------------- | -------------- |
| virtual | **[~IMessage](Classes/structllarp_1_1dht_1_1IMessage.md#function-~imessage)**() =default |
| | **[IMessage](Classes/structllarp_1_1dht_1_1IMessage.md#function-imessage)**(const [Key_t](Classes/structllarp_1_1dht_1_1Key__t.md) & from)<br>construct  |
| virtual bool | **[BEncode](Classes/structllarp_1_1dht_1_1IMessage.md#function-bencode)**([llarp_buffer_t](Classes/structllarp__buffer__t.md) * buf) const =0 |
| virtual bool | **[DecodeKey](Classes/structllarp_1_1dht_1_1IMessage.md#function-decodekey)**(const [llarp_buffer_t](Classes/structllarp__buffer__t.md) & key, [llarp_buffer_t](Classes/structllarp__buffer__t.md) * val) =0 |

**Public Attributes inherited from [llarp::dht::IMessage](Classes/structllarp_1_1dht_1_1IMessage.md)**

|                | Name           |
| -------------- | -------------- |
| [Key_t](Classes/structllarp_1_1dht_1_1Key__t.md) | **[From](Classes/structllarp_1_1dht_1_1IMessage.md#variable-from)**  |
| [PathID_t](Classes/structllarp_1_1PathID__t.md) | **[pathID](Classes/structllarp_1_1dht_1_1IMessage.md#variable-pathid)**  |
| uint64_t | **[version](Classes/structllarp_1_1dht_1_1IMessage.md#variable-version)**  |


## Public Functions Documentation

### function RelayedFindRouterMessage

```cpp
inline RelayedFindRouterMessage(
    const Key_t & from
)
```


### function HandleMessage

```cpp
virtual bool HandleMessage(
    llarp_dht_context * ctx,
    std::vector< IMessage::Ptr_t > & replies
) const override
```

handle a relayed [FindRouterMessage](Classes/structllarp_1_1dht_1_1FindRouterMessage.md), do a lookup on the dht and inform the path of the result TODO: smart path expiration logic needs to be implemented 

**Reimplements**: [llarp::dht::IMessage::HandleMessage](Classes/structllarp_1_1dht_1_1IMessage.md#function-handlemessage)


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

Updated on 2023-03-26 at 04:03:14 +0000