TCP (Transmission Control Protocol):
1 provide reliable data transmission under the IP environment (the byte stream emitted by a computer will be sent to other computers on the network without error, and when computer A receives the packet, it also sends back the packet to Computer B, which also produces some traffic, effective flow control, full duplex operation (data can be passed in two directions simultaneously) , multiplexing services, are oriented to connect, end-to-end transmission;
2) connection-oriented: must establish a connection with the other before formal communication. Make a connection to the data sent beforehand, and then send the data, like a phone call.
3 Application protocol for TCP support: Telnet (remote login), FTP (File Transfer Protocol), SMTP (Simple Mail Transfer Protocol). TCP is used to transmit large amount of data and high reliability requirements.
UDP (Subscriber datagram Protocol, user data Protocol)
1) for the connectionless (formal communication does not need to establish a connection with the other party, regardless of the other state on the direct transmission, such as SMS, QQ), can not provide reliability, flow control, error recovery function. UDP is used to transmit only a small amount of data at a time, low reliability requirements, transmission economy and other applications.
2 The application protocol supported by UDP: NFS (Network File system), SNMP (Simple Network Management System), DNS (primary Domain Name System), TFTP (Universal File Transfer Protocol) and so on.
Summarize:
TCP: Connection-oriented, reliable transmission (to ensure data correctness, ensure data order), for transmission of large amounts of data (stream mode), slow speed, to establish a connection requires more overhead (time, system resources).
UDP: Non-connectivity, unreliable transmission, for transfer of small amounts of data (packet mode), speed.