SDL_FlushIO(3)
π SDL_FlushIO(3) β the SDL3 functions glow-up π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where we're talking about SDL_FlushIO β aka the "pls just send it already" function π«Ά
β¨ NAME β¨
SDL_FlushIO β flush any buffered data in the stream. no cap, that's the whole job description π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_iostream.h>
bool SDL_FlushIO(SDL_IOStream *context);
β¨ DESCRIPTION β¨
so here's the tea β β this function makes sure that any buffered data is written to the stream. it's giving "bestie, hit send" energy π¨
normally this isn't necessary π₯± β like, the stream handles its own business most of the time and you can just vibe. but if the stream is a pipe or a socket, this guarantees that any pending data is actually sent. that's the moment where SDL_FlushIO is literally the main character π
β¨ FUNCTION PARAMETERS β¨
contextβ theSDL_IOStreamstructure you wanna flush. yes, that one. the stream. give it a lil flush π
β¨ RETURN VALUE β¨
- returns
trueon success π - returns
falseon failure π β and if that happens, callSDL_GetError()for more info, she'll tell you what went wrong π
β¨ THREAD SAFETY β¨
π¨ do not use the same SDL_IOStream from two threads at once. i'm so serious. that's a vibe check you do NOT want to fail π
β¨ AVAILABILITY β¨
this function has been available since SDL 3.2.0 β so if you're on anything older, that's a you problem (respectfully) π
β¨ SEE ALSO β¨
go read those too, they're iconic in their own right π¦
and that's the whole page, bestie!! brought to you by Simple Directmedia Layer π, running the SDL 3.4.18 era of the SDL 3 timeline β¨ β flush responsibly, mwah ππ
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms