What protocol (tcp or udp) does NetworkedMultiplayerENet use?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By dustin

I want to use ngrok to test my multiplayer game made in godot with my friends and for awhile i didnt get any results and everytime i connected to the ngrok server create_client() would just return 0, with no sign of a connection. Then i found out that ngrok only uses tcp and not udp. Im asking so i can get to the bottom of why i cant establish a communicable connection using ngrok.

:bust_in_silhouette: Reply From: Calinou

The high-level multiplayer API uses UDP exclusively. No TCP is used.

To expose your server to the public Internet, you need to either:

  • Forward the server port to your PC’s internal IP on your router.
  • Use Godot’s UPnP class to forward the port automatically (but keep in mind it’s not supported on all routers).
  • Set up a VPN with your friend.

I clarified this in the documentation: Mention that NetworkedMultiplayerENet uses UDP only by Calinou · Pull Request #45171 · godotengine/godot · GitHub