---
title: llarp::dns::QueryJob_Base
summary: a job handling 1 dns query 

---

# llarp::dns::QueryJob_Base



a job handling 1 dns query 


`#include <server.hpp>`

Inherited by [llarp::dns::QueryJob](Classes/classllarp_1_1dns_1_1QueryJob.md)

## Public Functions

|                | Name           |
| -------------- | -------------- |
| | **[QueryJob_Base](Classes/classllarp_1_1dns_1_1QueryJob__Base.md#function-queryjob-base)**([Message](Classes/structllarp_1_1dns_1_1Message.md) query) |
| virtual | **[~QueryJob_Base](Classes/classllarp_1_1dns_1_1QueryJob__Base.md#function-~queryjob-base)**() =default |
| [Message](Classes/structllarp_1_1dns_1_1Message.md) & | **[Underlying](Classes/classllarp_1_1dns_1_1QueryJob__Base.md#function-underlying)**() |
| const [Message](Classes/structllarp_1_1dns_1_1Message.md) & | **[Underlying](Classes/classllarp_1_1dns_1_1QueryJob__Base.md#function-underlying)**() const |
| void | **[Cancel](Classes/classllarp_1_1dns_1_1QueryJob__Base.md#function-cancel)**()<br>cancel this operation and inform anyone who cares  |
| virtual void | **[SendReply](Classes/classllarp_1_1dns_1_1QueryJob__Base.md#function-sendreply)**([llarp::OwnedBuffer](Classes/structllarp_1_1OwnedBuffer.md) replyBuf) =0<br>send a raw buffer back to the querier  |

## Protected Attributes

|                | Name           |
| -------------- | -------------- |
| [Message](Classes/structllarp_1_1dns_1_1Message.md) | **[m_Query](Classes/classllarp_1_1dns_1_1QueryJob__Base.md#variable-m-query)** <br>the original dns query  |
| std::atomic_flag | **[m_Done](Classes/classllarp_1_1dns_1_1QueryJob__Base.md#variable-m-done)** <br>True if we've sent a reply (including via a call to cancel)  |

## Public Functions Documentation

### function QueryJob_Base

```cpp
inline explicit QueryJob_Base(
    Message query
)
```


### function ~QueryJob_Base

```cpp
virtual ~QueryJob_Base() =default
```


### function Underlying

```cpp
inline Message & Underlying()
```


### function Underlying

```cpp
inline const Message & Underlying() const
```


### function Cancel

```cpp
void Cancel()
```

cancel this operation and inform anyone who cares 

### function SendReply

```cpp
virtual void SendReply(
    llarp::OwnedBuffer replyBuf
) =0
```

send a raw buffer back to the querier 

**Reimplemented by**: [llarp::dns::QueryJob::SendReply](Classes/classllarp_1_1dns_1_1QueryJob.md#function-sendreply)


## Protected Attributes Documentation

### variable m_Query

```cpp
Message m_Query;
```

the original dns query 

### variable m_Done

```cpp
std::atomic_flag m_Done = ATOMIC_FLAG_INIT;
```

True if we've sent a reply (including via a call to cancel) 

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

Updated on 2023-01-09 at 18:23:48 +0000