Hello,
I am developing a webgl game and need to use websockets, but I ran a simple test and I am seeing 2.3x higher latency when using websockets than udp. From all I know the difference should not be that big?
The game is a very simple NGO with UTP project, sending a Vector2 as input and moving a NetworkTransform, plus syncing an ulong every tick. Client in Unity editor, server in a Linux build. For measuring latency I am using NGOs built in method for reading rtt. When using udp the rtt is 33ms, which is also what ping from the client to the server machine shows. But just switching to Websockets, without TLS, the RTT is 75ms.
As an additonal check, I tried a Photon Fusion sample project in exactly the same setup and it shows no difference in rtt at all between udp and websockets.
Any ideas?