libgui 2.01
libgui is a GUI library for the GameCube, Wii, and Wii U
 
Loading...
Searching...
No Matches
WiiNetwork.h
1/****************************************************************************
2 * Platform Abstraction Layer (OGC driver)
3 * Daryl Borth 2026
4 * WiiNetwork.h
5 *
6 * Wii network interface bring-up
7 *
8 * ensureUp() re-validates the network is actually still up on every call
9 * rather than trusting a cached flag. Bring-up is asynchronous
10 * via net_init_async and run on a dedicated background Thread
11 ***************************************************************************/
12#pragma once
13
17{
18 public:
24 static bool ensureUp(bool (*cancel)(void) = nullptr);
25
27 static bool isUp();
28
30 static void notifyWhenUp(void (*callback)());
31
33 static void shutdown();
34};
Wii network bring-up (asynchronous net_init_async on a background thread).
Definition WiiNetwork.h:17
static void notifyWhenUp(void(*callback)())
Registers callback to run exactly once.
static void shutdown()
Stops and joins the background bring-up thread.
static bool isUp()
Non-blocking: true if the console currently has a usable IP.
static bool ensureUp(bool(*cancel)(void)=nullptr)
Brings the network interface up if it isn't already, or confirms it's still alive if it is.