2
Sending and Receiving Data
In the previous chapter, we saw how we can establish a connection between two computers using the high-level Godot Engine ENetMultiplayerPeer API. But what do we do after that? Why do we establish connections between computers? The foundation of a network is the communication between the connected computers, allowing them to send and receive data. This data is transferred by breaking down the content into small chunks called packets.
Each packet is like a postcard containing the necessary information, such as the sender’s and receiver’s IP addresses, the communication port, and the message’s content. We then send these packets over the network, where they can be routed to their intended recipient. Using communication ...
Get The Essential Guide to Creating Multiplayer Games with Godot 4.0 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.