What is the diffrent between the WebSocketServer and the NetworkedMultiplayerENet?

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

The WebSocketServer also works as an http site, but is it slower?
Should I always use the WebSocketServer or is the NetworkedMultiplayerENet better?
Should I use something else?
I didn’t find anything in the Godot documentation about the differences between the WebSocketServer and the NetworkedMultiplayerENet.

I hope someone can explain the difference to me.
Gamemap

:bust_in_silhouette: Reply From: MrEliptik

I’m not entirely sure but I believe NetworkedMultiplayerENet is packet based. If you take a look at PacketPeer — Documentation de Godot Engine (4.x) en français which is what NetworkedMultiplayerENet implements, it’s said to be “an abstraction and base class for packet-based protocols (such as UDP)”.

Websockets are a two way communication pipe if you want. From this article we see “The protocol consists of an opening handshake followed by basic message framing, layered over TCP”.

I remember seeing some benchmarks on Websockets saying they were pretty fast. I guess it depends on what you want dot, how much control you need, etc…

There’s a bit of documentation on networking, I don’t know if you read it already: API multijoueur de haut niveau — Documentation de Godot Engine (4.x) en français

Thank you very much.

Gamemap | 2021-05-06 06:01