TCP and UDP occurring over the same route on a WAN can wreak havoc with UDP packet loss.[1] Using both is only a good idea up until you dig deep into socket performance. A network is not a piece of software where you can isolate things and expect them to behave in an isolated way, everything you push over it interacts with everything else that you are pushing over it. This &quot;use UDP and TCP&quot; is a dangerous anti-pattern because it seems to be an obvious solution from a software perspective, but is in reality a problem from the electron perspective. To paraphrase a famous quote:<p>&gt; Some game developers, when confronted with a TCP problem, think &quot;I know, I&#x27;ll add UDP.&quot; Now they have two problems.<p>Games that implement their own protocol over UDP typically have packet modes (frequently a &quot;channel&quot; akin to WebSocket channels): reliable, ordered delivery or neither or either. There is almost always the notion of a connection, where appropriate. This is the correct way to do things, and with Raknet now being free you really have no excuse to do it any other way.<p>For authentication you could just use the reliable&#x2F;ordered channel and carry on as though you were using TCP - which somewhat defeats the purpose of this article.<p>[1]: <a href="https:&#x2F;&#x2F;www.isoc.org&#x2F;inet97&#x2F;proceedings&#x2F;F3&#x2F;F3_1.HTM" rel="nofollow">https:&#x2F;&#x2F;www.isoc.org&#x2F;inet97&#x2F;proceedings&#x2F;F3&#x2F;F3_1.HTM</a>