Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: sf::IpAddress::getPublicAddress always return 0.0.0.0  (Read 644 times)

0 Members and 1 Guest are viewing this topic.

Blenderiste09

  • Newbie
  • *
  • Posts: 7
    • View Profile
sf::IpAddress::getPublicAddress always return 0.0.0.0
« 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 :)

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 9558
    • View Profile
    • development blog
    • Email
Re: sf::IpAddress::getPublicAddress always return 0.0.0.0
« Reply #1 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.
Official FAQ: https://www.sfml-dev.org/faq.php
Nightly Builds: https://www.nightlybuilds.ch/
——————————————————————
Dev Blog: https://dev.my-gate.net/
Thor: http://www.bromeon.ch/libraries/thor/

Blenderiste09

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: sf::IpAddress::getPublicAddress always return 0.0.0.0
« Reply #2 on: May 12, 2020, 01:30:02 pm »
Nice ! It's working !

Thank you very much :)

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 9558
    • View Profile
    • development blog
    • Email
Re: sf::IpAddress::getPublicAddress always return 0.0.0.0
« Reply #3 on: May 12, 2020, 01:37:37 pm »
Glad to hear and sorry about the issue! :)
Official FAQ: https://www.sfml-dev.org/faq.php
Nightly Builds: https://www.nightlybuilds.ch/
——————————————————————
Dev Blog: https://dev.my-gate.net/
Thor: http://www.bromeon.ch/libraries/thor/

 

anything