1/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
2/* If you are missing that file, acquire a complete release at teeworlds.com. */
3
4#include "host_lookup.h"
5
6#include <base/net.h>
7#include <base/str.h>
8
9CHostLookup::CHostLookup() = default;
10
11CHostLookup::CHostLookup(const char *pHostname, int Nettype)
12{
13 str_copy(dst&: m_aHostname, src: pHostname);
14 m_Nettype = Nettype;
15 Abortable(Abortable: true);
16}
17
18void CHostLookup::Run()
19{
20 m_Result = net_host_lookup(hostname: m_aHostname, addr: &m_Addr, types: m_Nettype);
21}
22