Home
Knowledge Base
Credits
Site Map
 


Services Provided by the Internet Transport Protocols


The Internet makes two transport protocols available to applications, UDP and TCP. When you create a new network application for the Internet, one of the first decisions that you
must make is whether to use UDP or TCP. Each protocol offers a different service model to the application. The TCP Service model includes a connection-oriented service and a reliable data transfer service. When an application invokes TCP for its transport protocol,
the application receives both of these services from TCP.


Connection-oriented service:
TCP has the client and server exchange transport layer
control information with each other before the application level messages begin to flow. A TCP connection is said to exist between the sockets of the two processes. The connection
is a full-duplex connection in that the two processes can send messages to each other over
the connection at the same time. When the application is finished sending messages, it must
tear down the connection. The service is referred to as a “connection-oriented” service
rather than a “connection” service because the two processes are connected in a very loose
manner.

 


Reliable transport service:
the communicating processes can rely on TCP to deliver all
data sent without error and in the proper order. When one side of the application passes a
stream of bytes into a socket, it can count on TCP to deliver the same stream of bytes to the
receiving socket, with no missing or duplicate bytes. TCP also includes a congestion-control
mechanism which throttles a sending process when the network is congested between sender
and receiver. The throttling of the transmission rate can have very harmful effect on real-
time audio and video applications that have a minimum required bandwidth constraint.
Real-time applications are loss-tolerant and does not need a fully reliable transport service.
Developers of real-time applications usually run their applications over UDP rather than
TCP.


Some of the services that TCP does not provide: it does not guarantee a minimum
transmission rate, a sending process is not permitted to transmit at any rate it wishes, the
sending rate is regulated by TCP congestion control, or it may force the sender to send at a
low average rate. TCP does not provide any delay guarantees. When a sending passes data
into a TCP socket, the data will eventually arrive at the receiving process, but TCP
guarantees absolutely no limit on how long the data may take to get there. TCP guarantees
delivery of all data, but provides no guarantees on the rate of delivery or on the delays
experienced.

UDP does not include a congestion control mechanism, so a sending process can pump data
into a UDP socket at any rate it pleases. Because real-time applications usually can tolerate
some loss but require a minimal rate, developers of real-time applications often choose to
run their applications over UDP, thereby circumventing TCP's congestion control and
packet overheads. Similar to TCP, UDP provides no guarantee on delay.

E-mail, remote terminal access, the Web, and file transfer all us TCP. These applications
have chosen TCP because TCP provides a reliable data transfer service, guaranteeing that
all data will eventually get to its destination. Internet telephony typically runs over UDP. Each side of an Internet phone application needs to send data across the network at some
minimum rate; this is more likely to be possible with UDP than TCP. Internet phone applications are loss-tolerant, so they do not need the reliable data transfer service
provided by TCP. Today's Internet can often provide satisfactory service to time-sensitive
applications, but it cannot provide any timing or bandwidth guarantees.