---
title: llarp::dht::GotNameMessage

---

# llarp::dht::GotNameMessage





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

## Public Functions

|                | Name           |
| -------------- | -------------- |
| | **[GotNameMessage](Classes/structllarp_1_1dht_1_1GotNameMessage.md#function-gotnamemessage)**(const [Key_t](Classes/structllarp_1_1dht_1_1Key__t.md) & from, uint64_t txid, [service::EncryptedName](Classes/structllarp_1_1service_1_1EncryptedName.md) data) |
| virtual bool | **[BEncode](Classes/structllarp_1_1dht_1_1GotNameMessage.md#function-bencode)**([llarp_buffer_t](Classes/structllarp__buffer__t.md) * buf) const override |
| virtual bool | **[DecodeKey](Classes/structllarp_1_1dht_1_1GotNameMessage.md#function-decodekey)**(const [llarp_buffer_t](Classes/structllarp__buffer__t.md) & key, [llarp_buffer_t](Classes/structllarp__buffer__t.md) * val) override |
| virtual bool | **[HandleMessage](Classes/structllarp_1_1dht_1_1GotNameMessage.md#function-handlemessage)**(struct [llarp_dht_context](Classes/structllarp__dht__context.md) * dht, std::vector< Ptr_t > & replies) const override |

## Public Attributes

|                | Name           |
| -------------- | -------------- |
| [service::EncryptedName](Classes/structllarp_1_1service_1_1EncryptedName.md) | **[result](Classes/structllarp_1_1dht_1_1GotNameMessage.md#variable-result)**  |
| uint64_t | **[TxID](Classes/structllarp_1_1dht_1_1GotNameMessage.md#variable-txid)**  |

## Additional inherited members

**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  |

**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 GotNameMessage

```cpp
explicit GotNameMessage(
    const Key_t & from,
    uint64_t txid,
    service::EncryptedName data
)
```


### function BEncode

```cpp
virtual bool BEncode(
    llarp_buffer_t * buf
) const override
```


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


### function DecodeKey

```cpp
virtual bool DecodeKey(
    const llarp_buffer_t & key,
    llarp_buffer_t * val
) override
```


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


### function HandleMessage

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


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


## Public Attributes Documentation

### variable result

```cpp
service::EncryptedName result;
```


### variable TxID

```cpp
uint64_t TxID;
```


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

Updated on 2023-01-27 at 23:09:26 +0000