1. TCP/IP protocol model
Application layer: Application;
Transport layer: The data socket port, providing end-to-end communication services;
Network Interconnection layer: Responsible for data packaging, addressing and routing, but also includes inter-network Control Message Protocol;
Network interface layer: Provides the interface between the data structure of the TCP/IP protocol and the actual physical hardware.
2. Port:
Port, which is the channel used by the application for data interaction, to implement communication between programs. Each application has a fixed port. telnet--23 SMTP-25 FTP-21 HTTP-80
3. TCP protocol:
- A more reliable bidirectional flow protocol;
- three-time handshake;
- Provides services such as message acknowledgement, error detection, and error recovery. If the data in the transmission process loss, lost, will require the sender resend, thereby guaranteeing the integrity of the data.
4. UDP protocol
Less reliable. If data is lost in transit, no retransmission is required and the advantage is that it is fast.
Java object-Oriented programming chapter 18th--Network programming