I've hated SDL_net for over two decades now.
It was something that was built, and largely abandoned, at Loki. I've never really cared for the API, it's stuck on IPv4, and it's largely been collecting dust for many years.
But since we're revamping everything for the SDL3 era, I asked "should we do something with this or just archive the repository?"
The consensus was "retire it," but I thought, hey, if no one cares about this thing, then no one will care if I replace it entirely!
SDL_net, up until this morning, was probably meant to be a small wrapper over networking APIs, because at the time of its writing, you might be on a Unix machine using BSD Sockets, or you might be on Windows using WinSock, which is sort of like BSD Sockets...or you might be on a classic Mac, using something called "Open Transport," whatever that is. SDL_net could paper over the differences.
But, mistakes were made. It turns out ~4 billion IP addresses wasn't enough for everybody, and since SDL_net hardcoded a 32-bit int type to represent IPv4 addresses, something was going to have to change here no matter what.
There are a lot of design goals in SDL_net I didn't care for: it tries to provide an interface to Unix select(), which hindsight has taught us kinda sucks at the system level, and it does some weird memory management that exists from a time where your game is likely to eat all 64 megabytes of RAM in a machine, so tapdancing in the networking library to pool memory made a lot of sense.
I decided to throw everything away, with some explicit goals for a rewrite:
Network addresses would be abstracted from the API, so IPv4 and IPv6 can live together in peace and harmony, and we won't be caught with our pants down when the next major protocol arrives someday.
Everything decided to standardize on BSD Sockets, more or less, so let's make something that's easier to use than BSD Sockets.
Let's make the whole thing non-blocking! So GAMES can use it!
This is what I have now done. You can read all my justifications here.
And boy, did this remove some cruft.
My goal--which I may never reach--is to eventually build some features into SDL_net so this isn't just a "simpler socket library." I'd like it if the library offered a means to use TLS, and WebSockets, and WebRTC, without having to pull in any additional dependencies, like OpenSSL. I think it'd be a killer feature. It'd also be murderously hard to implement. But I guess most killer features are.
But if nothing else, the library is now small, modernized, and hopefully both easy and useful.
The documentation for the new version is on the wiki. SDL3_net is now the "main" branch on GitHub. (The old code is living in an "SDL2" branch now.)
Here's a simple HTTP GET example in about 70 lines of C, and a quick-and-dirty client/server VoIP chat in 370.
Go forth and make networked things.