NET_Init(3)

πŸ“¦
version 3.2.0 Β· 2 versions
, in fedora 43, fedora 44

πŸ’– NET_Init πŸ’–

okay bestie, so this is a page from the SDL_net3 FUNCTIONS section, and it's literally the first thing you ever touch in the SDL_net library. main character energy, no cap. πŸŽ€


✨ NAME ✨

NET_Init β€” the one that boots up the SDL_net library. like turning the lights on before the party. πŸͺ©


🌸 SYNOPSIS 🌸

#include <SDL3_net/SDL_net.h>

bool NET_Init(void);

that's it. no args. she takes nothing and gives you everything. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so listen. you must call this successfully once before you can use (almost) any other SDL_net function. like, this is the vibe check every other function is waiting on. if you skip it, don't come crying to me. 😭

but here's the slay part: it's totally safe to call this multiple times. the library is smart like that β€” it'll only actually initialize once, and it won't deinitialize until NET_Quit() has been called a matching number of times. so it's counting, bestie. it's keeping receipts. 🧾✨

and those extra init attempts? they just report success. no drama, no errors, just vibes. 🫢


πŸ‘‘ RETURN VALUE πŸ‘‘

  • true β€” success, we're so back ✨
  • false β€” error, it's giving tragedy 😭

if you get false, 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 off, multithreaded icon. 🌈


⭐ AVAILABILITY ⭐

this function has been available since SDL_net 3.0.0. she's been here. she's a legend. πŸ‘‘


πŸ’œ SEE ALSO πŸ’œ

  • NET_Quit(3) β€” the other half of the situationship, iykyk πŸŽ€

and that's the whole page, bestie!! this manual came to you from SDL_net, version SDL_net 3.2.0 β€” so go forth, call NET_Init, and slay. periodt. πŸ’…βœ¨πŸ¦‹πŸ’–

πŸ“¦ where this page comes from