SDL_net 3.0 is finally here!
SDL3_net is a complete rewrite of SDL2_net; it is a new API that we feel is better designed and more enjoyable to use.
Some features of SDL3_net:
-
A much-simplified API, currently focused on making stream and datagram sockets easier to manage.
-
SDL3_net is no longer inextricably locked to IPv4. In fact, it makes it easy to build networked programs that talk to IPv4 and IPv6 simultaneously.
-
Everything is asynchronous. Nothing ever blocks, including DNS lookups. An app can query for results later, or use one of the NET_Wait* functions to put the calling thread to sleep until results are available.
There are several simple examples of using SDL3_net, including a group VoIP app in under 500 lines of C, available in the examples directory.
We’ve also updated the installation instructions and added a quick reference guide:
https://wiki.libsdl.org/SDL3_net
Enjoy!