---
title: llarp::dns::QueryJob
summary: non complex implementation of QueryJob_Base for use in things that only ever called on the mainloop thread 

---

# llarp::dns::QueryJob



non complex implementation of [QueryJob_Base](Classes/classllarp_1_1dns_1_1QueryJob__Base.md) for use in things that only ever called on the mainloop thread 


`#include <server.hpp>`

Inherits from [llarp::dns::QueryJob_Base](Classes/classllarp_1_1dns_1_1QueryJob__Base.md), std::enable_shared_from_this< QueryJob >

## Public Functions

|                | Name           |
| -------------- | -------------- |
| | **[QueryJob](Classes/classllarp_1_1dns_1_1QueryJob.md#function-queryjob)**(std::shared_ptr< [PacketSource_Base](Classes/classllarp_1_1dns_1_1PacketSource__Base.md) > source, const [Message](Classes/structllarp_1_1dns_1_1Message.md) & query, const [SockAddr](Classes/structllarp_1_1SockAddr.md) & to_, const [SockAddr](Classes/structllarp_1_1SockAddr.md) & from_) |
| virtual void | **[SendReply](Classes/classllarp_1_1dns_1_1QueryJob.md#function-sendreply)**([llarp::OwnedBuffer](Classes/structllarp_1_1OwnedBuffer.md) replyBuf) const override<br>send a raw buffer back to the querier  |

## Additional inherited members

**Public Functions inherited from [llarp::dns::QueryJob_Base](Classes/classllarp_1_1dns_1_1QueryJob__Base.md)**

|                | 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)**() const<br>cancel this operation and inform anyone who cares  |

**Protected Attributes inherited from [llarp::dns::QueryJob_Base](Classes/classllarp_1_1dns_1_1QueryJob__Base.md)**

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


## Public Functions Documentation

### function QueryJob

```cpp
inline explicit QueryJob(
    std::shared_ptr< PacketSource_Base > source,
    const Message & query,
    const SockAddr & to_,
    const SockAddr & from_
)
```


### function SendReply

```cpp
inline virtual void SendReply(
    llarp::OwnedBuffer replyBuf
) const override
```

send a raw buffer back to the querier 

**Reimplements**: [llarp::dns::QueryJob_Base::SendReply](Classes/classllarp_1_1dns_1_1QueryJob__Base.md#function-sendreply)


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

Updated on 2022-09-19 at 17:18:33 +0000