SDL_net
SDL_net copied to clipboard
voipchat: allow configuring server bind address from cli arguments
This allows you to bind the voipchat
server to 127.0.0.1
or ::1
.
This change is motivated by the following observations of current voipchat
:
When running voipchat --server
, it was unclear to what socket the server was bound to.
Also, the following combination failed for me:
server command: ./voipchat --server
clients command: ./voipchat localhost
Only after changing the client command to ./voipchat 127.0.0.1
could I get working voip.
This pr explicitly selects a binding address for the server, so it will never pass NULL
to SDLNet_CreateDatagramSocket
when creating a server.
Perhaps https://github.com/libsdl-org/SDL_net/pull/85 is related.