SDLNet_ResolveHost always return 0 no matter if there is any host on that IP and port. According to the documentation it should return -1 when an error occurs.
SDLNet_ResolveHost
How can a non existing host be detected?
Ok, so I found the solution. SDLNet_TCP_Open will return NULL when an error occurs.
SDLNet_TCP_Open
NULL
Ok, so I found the solution.
SDLNet_TCP_Open
will returnNULL
when an error occurs.