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/system.h>
7
8CHostLookup::CHostLookup() = default;
9
10CHostLookup::CHostLookup(const char *pHostname, int Nettype)
11{
12 str_copy(dst&: m_aHostname, src: pHostname);
13 m_Nettype = Nettype;
14 Abortable(Abortable: true);
15}
16
17void CHostLookup::Run()
18{
19 m_Result = net_host_lookup(hostname: m_aHostname, addr: &m_Addr, types: m_Nettype);
20}
21