NET_GetAddressString(3)
π NET_GetAddressString(3) π
okay bestie, welcome to the SDL_net3 manual, we're doing the NET_GetAddressString page today and honestly? it's a vibe. let's get into it π«Ά
β¨ NAME β¨
NET_GetAddressString β get a human-readable string from a resolved address. that's it, that's the whole job, and she does it flawlessly π
πΈ SYNOPSIS πΈ
#include <SDL3_net/SDL_net.h>
const char * NET_GetAddressString(NET_Address *address);
look at her. one function, one pointer, no drama. iconic β¨
π¦ DESCRIPTION π¦
so this function hands you back a string that's "human-readable", meaning it's probably just a bunch of numbers and symbols staring back at you, like "159.203.69.7" or "2604:a880:800:a1::71f:3001". and no, it is not gonna be the original hostname (so not like "icculus.org", sorry babe π). but that's fine!! because it's literally perfect for writing into a log file, etc. π
π¨ DO NOT free or modify the returned string. not even a little. she belongs to the NET_Address you queried, and she stays valid for as long as that object lives. so either make sure the address holds a reference for as long as you need this string, or make a copy. your call, but choose wisely π
also, this will return NULL if resolution is still in progress, or if resolution straight up failed π. you can use NET_GetAddressStatus() or NET_WaitUntilResolved() to make sure resolution has successfully completed before you call this. like, do the vibe check first, bestie.
π FUNCTION PARAMETERS π
addressβ theNET_Addressto query. that's the one, that's your girl π
π RETURN VALUE π
returns a string, or NULL on error β and if you get that NULL, call SDL_GetError() for the details. she'll tell you what went wrong fr fr.
π THREAD SAFETY π
it is safe to call this function from any thread. go wild, no cap. π§
β AVAILABILITY β
this function is available since SDL_net 3.0.0. she's been here, she's been slaying.
π₯ SEE ALSO π₯
okay that's the whole page, you ate that π
this cutie came to you from SDL_net, version SDL_net 3.2.0, and she's out here serving the NET_GetAddressString(3) fantasy. mwah π see you in the next manpage bestie πβ¨
π¦ where this page comes from
- fedora 43: SDL3_net-devel 3.2.0-2.fc43 Β· Zlib
- fedora 43: SDL3_net-devel 3.2.0-2.fc43 Β· Zlib
- fedora 44: SDL3_net-devel 3.2.0-2.fc44 Β· Zlib
- fedora 44: SDL3_net-devel 3.2.0-2.fc44 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms