.\" This manpage content is licensed under Creative Commons
.\"  Attribution 4.0 International (CC BY 4.0)
.\"   https://creativecommons.org/licenses/by/4.0/
.\" This manpage was generated from SDL_net's wiki page for NET_GetAddressStatus:
.\"   https://wiki.libsdl.org/SDL_net/NET_GetAddressStatus
.\" Generated with SDL/build-scripts/wikiheaders.pl
.\"  revision 3.2.0+ds-1
.\" Please report issues in this manpage's content at:
.\"   https://github.com/libsdl-org/sdlwiki/issues/new
.\" Please report issues in the generation of this manpage from the wiki at:
.\"   https://github.com/libsdl-org/SDL/issues/new?title=Misgenerated%20manpage%20for%20NET_GetAddressStatus
.\" SDL_net can be found at https://libsdl.org/projects/SDL_net
.de URL
\$2 \(laURL: \$1 \(ra\$3
..
.if \n[.g] .mso www.tmac
.TH NET_GetAddressStatus 3 "SDL_net 3.2.0" "SDL_net" "SDL_net3 FUNCTIONS"
.SH NAME
NET_GetAddressStatus \- Check if an address is resolved, without blocking\[char46]
.SH SYNOPSIS
.nf
.B #include <SDL3_net/SDL_net.h>
.PP
.BI "NET_Status NET_GetAddressStatus(NET_Address *address);
.fi
.SH DESCRIPTION
The
.BR NET_Address
objects returned by
.BR NET_ResolveHostname
take time to do their work, so it does so _asynchronously_ instead of making your program wait an indefinite amount of time\[char46]
.PP
This function allows you to check the progress of that work without blocking\[char46]
.PP
Resolution can fail after some time (DNS server took awhile to reply that the hostname isn\(aqt recognized, etc), so be sure to check the result of this function instead of assuming it worked because it\(aqs non-zero!
.PP
Once an address is successfully resolved, it can be used to connect to the host represented by the address\[char46]

.SH FUNCTION PARAMETERS
.TP
.I address
The
.BR NET_Address
to query\[char46]
.SH RETURN VALUE
Returns
.BR NET_SUCCESS
if successfully resolved,
.BR NET_FAILURE
if resolution failed,
.BR NET_WAITING
if still resolving (this function timed out without resolution); if
.BR NET_FAILURE ,
call SDL_GetError() for details\[char46]

.SH THREAD SAFETY
It is safe to call this function from any thread\[char46]

.SH AVAILABILITY
This function is available since SDL_net 3\[char46]0\[char46]0\[char46]

.SH SEE ALSO
.BR NET_WaitUntilResolved (3)
