Search code examples
securitytcpnetwork-programmingudp

UDP vs TCP security


We are working on a game with millions of clients communicating with our servers. These games are for the most part turn-based. I am aware that UDP offers some performance advantages over TCP, but I'm wondering if one protocol enjoys a security advantage over the other? I've read some sites indicating that TCP will generally be safer, but I've seen a significant number of attacks that exploit weaknesses in TCP.

Our code is pretty tolerant of unreliable connections and lost/out-of-order data, which is why I thought of UDP. Thank you!


Solution

  • This is a good resource to compare UDP and TCP : http://www.skullbox.net/tcpudp.php.

    Traditionally,most real-time applications use UDP eg:VOIP.I am not an expert on Security, but I guess both of them are equally secure/unsecure.It depends on usage of Security protocols like TLS etc.

    TCP just has mechanisms to guarantee delivery of packets.