SFML community forums

Help => Network => Topic started by: Blenderiste09 on May 12, 2020, 12:36:40 pm

Title: sf::IpAddress::getPublicAddress always return 0.0.0.0
Post by: Blenderiste09 on May 12, 2020, 12:36:40 pm
Hello everyone !

I was developping a server when I got a bug. sf::IpAddress::getPublicAddress always return 0.0.0.0.
So, I tried to make a minimal working example and it still do the same :
#include <iostream>
#include "SFML/Network.hpp"

int main()
{
        std::cout << sf::IpAddress::getLocalAddress() << std::endl;
        std::cout << sf::IpAddress::getPublicAddress() << std::endl;

        return 0;
}
This is what it prints:
192.168.1.64
0.0.0.0

Anyone know if I'm doing something wrong ?
I'm using VS 2019 under Windows 10. I'm using SFML 2.5.1 for VC++15 with static linking

Thanks in advance :)
Title: Re: sf::IpAddress::getPublicAddress always return 0.0.0.0
Post by: eXpl0it3r on May 12, 2020, 01:04:44 pm
Can you try again please?

Looks like the server move, changed the HTTPS / HTTP handling. I've fixed this right now.
Title: Re: sf::IpAddress::getPublicAddress always return 0.0.0.0
Post by: Blenderiste09 on May 12, 2020, 01:30:02 pm
Nice ! It's working !

Thank you very much :)
Title: Re: sf::IpAddress::getPublicAddress always return 0.0.0.0
Post by: eXpl0it3r on May 12, 2020, 01:37:37 pm
Glad to hear and sorry about the issue! :)