1
Network / Re: Function sf::IpAddress::getLocalAddress() on MacOS
« on: September 28, 2013, 06:31:27 pm »
This is what I am doing and get 0.0.0.0:
Add this in SocketImpl.cpp and nothing happened:
Even when inserting something that is not valid everything goes in the
same way, so I assume the program is not calling this file at all.
PS: Total newbie here.
std::string x = sf::IpAddress::getLocalAddress().toString();
// Create the main window
sf::RenderWindow window(sf::VideoMode(800, 600), x);
// Create the main window
sf::RenderWindow window(sf::VideoMode(800, 600), x);
Add this in SocketImpl.cpp and nothing happened:
std::memset(addr.sin_addr.s_addr, 0, sizeof(addr.sin_addr.s_addr));
std::memset(addr.sin_family, 0, sizeof(addr.sin_family));
std::memset(addr.sin_port , 0, sizeof(addr.sin_port ));
std::memset(addr.sin_family, 0, sizeof(addr.sin_family));
std::memset(addr.sin_port , 0, sizeof(addr.sin_port ));
Even when inserting something that is not valid everything goes in the
same way, so I assume the program is not calling this file at all.
PS: Total newbie here.