It doesn't make sense to me.
I've never used UDP for any IP or Sockets programming.
Google AI regurgitated this:
TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) are both transport layer protocols used for sending data over a network, but they differ in how they handle reliability and speed. TCP is connection-oriented, reliable, and ordered, making it suitable for applications where data integrity is crucial, like web browsing and email. UDP is connectionless, unreliable, and unordered, prioritizing speed and simplicity, making it suitable for applications like streaming and gaming, where occasional packet loss is acceptable.
Here's a more detailed comparison:
TCP:
• Connection-Oriented:
Establishes a connection before sending data, using a three-way handshake to ensure both parties are ready.
• Reliable:
Guarantees that all data packets are delivered in the correct order and that no packets are lost.
• Ordered:
Maintains the order of data packets during transmission.
• Slower:
Overhead of connection establishment, error checking, and retransmission can lead to slower data transfer rates compared to UDP.
• Suitable for:
Applications where data integrity is critical, such as web browsing, email, and file transfers.
UDP:
• Connectionless:
Sends data without establishing a connection, making it faster to start data transfer.
• Unreliable:
Does not guarantee that all data packets are delivered or that they are delivered in the correct order.
• Unordered:
Does not maintain the order of data packets during transmission.
• Faster:
Simpler protocol with less overhead, resulting in faster data transfer rates compared to TCP.
• Suitable for:
Applications where speed is more important than reliability, such as streaming, gaming, and real-time applications.
In essence:
• TCP:
.
Prioritizes reliability and ordered delivery, making it ideal for applications where data accuracy is essential.
• UDP:
.
Prioritizes speed and simplicity, making it suitable for applications where occasional packet loss is acceptable.
For example, web browsing and email typically use TCP because data integrity is crucial for these applications. On the other hand, video and audio streaming often use UDP because a few lost packets are not a significant issue, and speed is more important.
Regards,
Richard Schoen
Web:
http://www.richardschoen.net
Email: richard@xxxxxxxxxxxxxxxxx
------------------------------
message: 2
date: Tue, 3 Jun 2025 09:40:54 -0500
from: Brad Stone <bvstone@xxxxxxxxx>
subject: TCP vs UDP Sockets
I have a client who is having issues with DNS and IBM told him to switch his socket programs from using TCP to UDP.
Any rationale behind that that anyone can think of? Would this even work for an application making RESTful requests using a tool like HTTPAPI or GETURI
Bradley V. Stone
www.bvstools.com
Native IBM i e-Mail solutions for Microsoft Office 365, Gmail, or any Cloud Provider!
As an Amazon Associate we earn from qualifying purchases.