Letting the traffic flow
There are a lot more subtleties to communicating over the internet than using the right code. As we discussed previously, the port number an application uses to send or receive data can be imagined as a gateway to your system, of which there are thousands. That gateway can either be open or closed. By default, it's more likely than not that whichever port you choose to use for your program is going to be closed on your system, which doesn't matter for local connections, but anything coming from the outside world through that particular port is not going to get through. Managing your ports can be done by visiting your router's settings page. The steps required to do so are different for each router out there. Luckily, http://portforward.com is there to help you! By visiting it and looking up the make and model of your router on this website, you can find detailed instructions on how any port can be opened or closed.
Tip
Sockets bound to sf::Socket::AnyPort...