| 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 | |
| 8 | CHostLookup::CHostLookup() = default; |
| 9 | |
| 10 | CHostLookup::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 | |
| 17 | void CHostLookup::Run() |
| 18 | { |
| 19 | m_Result = net_host_lookup(hostname: m_aHostname, addr: &m_Addr, types: m_Nettype); |
| 20 | } |
| 21 |