TCP/UDP Connections Distinguished
The foregoing examples used TCP connections: session oriented connections with a high degree of congestion control and error correction.
The Socket abstraction hides the SocketImpl class, which provides these services. To that extent, TCP is said to provide “reliable” services.
There may be circumstances where we don’t want the overhead associated with reliability. UDP, user datagram protocol, allows us to use so-called ‘unreliable’ networking services. UDP is a datagram-oriented protocol, meaning there is no session.