In contrast to TCP, UDP is unreliable and connectionless. Neither the order of packets nor their delivery is guaranteed. These limitations, however, allow UDP to be very fast. So, if you have frequent data, which does not necessarily need to be received by the peer, use UDP. This data could, for example, be real-time positions of a player that get updated frequently or live video/audio streaming. Since QUdpSocket is mostly the same as QTcpSocket—both inherit QAbstractSocket—there is not much to explain. The main difference between them is that TCP is stream-oriented, whereas UDP is datagram-oriented. This means that the data is sent in small packages, containing among the actual content, the sender's as well as the receiver's IP address and port number.
Unlike QTcpSocket and QTcpServer, UDP does not need a separate server class because it is connectionless...