O'Reilly logo

SFML Blueprints by Maxime Barbier

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Network communication using sockets

To be able to interact with other players, we will need a way to communicate with them, regardless of the architecture used. To be able to communicate with any computer, we have to use sockets. In short, a socket enables communication with other processes/computers through the network as long as there is an existing way between both sides (LAN or Internet). There are two main kinds of sockets: non-connected (UDP) or connected (TCP). Both these need an IP address and a port number to communicate with their destination.

Notice that the number of available ports on a computer is contained between 0 and 65535. A piece of advice is to avoid the use of ports with a number lesser than 1024. The reason is that most of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required