Zeriku wrote:
As a disclaimer I am from the ORE generation of network programming, that by itself should say it all.
Eep!
I'll try to give you a quick run-through right now.
Headers: Every packet has a header that is added onto it to tell the networks it passes through where it is going. For TCP, that is 20 bytes. For UDP, 8, and for IPv4 (currently only IP used internet wise, will eventually be upgraded to IPv6 which is 40 bytes), 20. IPv4 is required for both TCP and UDP, so a TCP protocol requires 40 bytes per packet, UDP 28. This is for every packet sent to the client from server, or vise versa. This does not mean every time you use .SendData, though, since the Nagle Algorithm is often in play by default (won't go over that right now).
Packet buffering: The practice of combining packets together and sending them all at once. Combined with packet prioritizing (not sure how professional engines do this, but the method in vbGORE is the best I could come up with and it works great), you can hold packets for X amount of milliseconds before sending it to reduce header overhead, which means less CPU usage and bandwidth. You have to be careful, though, since holding it too long is going to cause quite a bit of delays, otherwise known as "lag".
Everything is covered in much more detail, along with more stuff, in the article.
