ENet Reliable RPC vs TCP

So, I read here ENet: Features and Architecture that ENetMultiplayerPeer has a “reliable” rpc option by using @rpc("authority", "call_remote", "reliable") for example. But it’s built on top of the UDP layer.

My questions is:

  • what happened if the packet drops, which will happen
  • what’s the overhead between using “reliable” and “unreliable” in ENetMultiplayerPeer?

ENet will resend the packet for you, similar to TCP. However, it still uses UDP behind the scenes. ENet never opens a TCP connection at any time, regardless of how many reliable packets you send through ENet.

If the connection is particularly prone to packet loss, ENet may reattempt sending the same reliable/ordered packet more than once.

It’s hard to estimate the overhead, but you should minimize the use of reliable packets whenever possible. Ordered packets (which are always reliable by design) have an even greater overhead than reliable packets (which aren’t guaranteed to be received in order).

1 Like

So, enet unreliable_ordered is reliable?

It appears ENet can indeed send unreliable ordered packets, while Godot’s high-level multiplayer in 3.x could only send reliable ordered packets (but not unreliable ordered packets). Disregard what I said above.


By “overhead”, are you two mainly talking about latency or something else?

Yes, it’s about latency (particularly in unstable network conditions).

1 Like