TCP / UDP protocol:

TCP / UDP protocol:

TCP (Transmission Control Protocol) connection-oriented, reliable transport layer protocol (for example: call) 
Advantages: reliable, stable, stable transmission complete, the data size is not limited
drawbacks: slow, inefficient, high system resources , pitch-catch need each other to confirm
applications: Web browser, e-mail, file transfer, large data transfers scene UDP (User Datagram protocol) one of unreliable transport layer protocol connectionless (example: fat SMS) advantages: fast, people can chat at the same time, consume fewer resources, without establishing a connection drawback: instability, can not guarantee that every data can be received by applications: IP telephony, real-time video conferencing, chat software, a small amount of data transmission scenes client and server when the connection is established: three-way handshake client and server when disconnected: four waving SYN create a connection ACK acknowledgment FIN disconnected










Three-way handshake fourth wave:

MSL is the maximum survival time segment 
by default a predetermined MSL 2 minutes, but the practical application usually from 30 seconds, 1 minute and 2 minutes, etc..

 

socket

Significance of the socket: pass network communication process, information splicing tools (Chinese: sockets)

 

Guess you like

Origin www.cnblogs.com/max404/p/11837837.html