libgui 2.01
libgui is a GUI library for the GameCube, Wii, and Wii U
 
Loading...
Searching...
No Matches
WiiNetwork Class Reference

Wii network bring-up (asynchronous net_init_async on a background thread). More...

#include <WiiNetwork.h>

Static Public Member Functions

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.
 
static bool isUp ()
 Non-blocking: true if the console currently has a usable IP.
 
static void notifyWhenUp (void(*callback)())
 Registers callback to run exactly once.
 
static void shutdown ()
 Stops and joins the background bring-up thread.
 

Detailed Description

Wii network bring-up (asynchronous net_init_async on a background thread).

Definition at line 16 of file WiiNetwork.h.

Member Function Documentation

◆ ensureUp()

bool WiiNetwork::ensureUp ( bool(* cancel )(void) = nullptr)
static

Brings the network interface up if it isn't already, or confirms it's still alive if it is.

Blocks ~10s until the console has a usable IP or bring-up is given up on.

Parameters
canceloptional; polled while waiting, and the wait is abandoned (returning false) as soon as it returns true. Lets a UI abort the ~10s wait.
Returns
true once the console has a usable IP.

Definition at line 143 of file WiiNetwork.cpp.

◆ isUp()

bool WiiNetwork::isUp ( )
static

Non-blocking: true if the console currently has a usable IP.

Definition at line 138 of file WiiNetwork.cpp.

◆ notifyWhenUp()

void WiiNetwork::notifyWhenUp ( void(* callback )())
static

Registers callback to run exactly once.

Definition at line 188 of file WiiNetwork.cpp.

◆ shutdown()

void WiiNetwork::shutdown ( )
static

Stops and joins the background bring-up thread.

Definition at line 202 of file WiiNetwork.cpp.


The documentation for this class was generated from the following files: