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