TCP vs UDP
viaLeetCode
Question: What is the difference between TCP and UDP?
Expected discussion: TCP is connection-oriented, guarantees ordered and reliable delivery via acknowledgements and retransmission, and performs congestion/flow control (3-way handshake to establish). UDP is connectionless, has no delivery/order guarantees, lower overhead and latency, suited for real-time use cases (video/voice/gaming) where occasional loss is acceptable over guaranteed delivery.
asked …