Specifications
University of Hertfordshire
23
Application
Reliable Stream
(TCP)
User Datagram
(UDP)
Internet Protocol (IP)
Network Interface
Figure 4.3 The conceptual layering of UDP and TCP above IP
When using UDP to transport datagrams, some possible errors may occur.
Datagrams are discarded, when router’s buffer is full. The sender will not receive error
information.
Datagrams are discarded, if datagrams cannot reach the destination. ICMP message will be
sent, if the datagrams pass by router.
UDP datagrams reach the destination, but there is no process waiting on particular port.
ICMP message will be returned to sender.
Datagrams reach the destination, but the receiver’s buffer is full. The receiver will discard
the datagrams automatically without sending any error information.
In this project, the server and the client use TCP to transport the streams to each other. Although
UDP is easy to implemented, it merely provides a kind of unreliable connectionless communication
service, UDP message can be lost, duplicated, delayed, or delivered out of order; the application
using UDP must handle these problems. However, nowadays, many programs use UDP do not
providing reliability, as a consequence, these programs can be tested successfully in Local Area
Network, but do not work correctly on the Internet. Because this project provide a kind of Internet
service, TCP is more suitable in this working environment.