socket socket is also called, is essentially a programming interface that encapsulates the TCP / IP. Write a socket server and client
Physical Layer: connecting medium: cable, twisted pair, radio waves, for transmitting electrical signals
Data Link Layer: grouping, so electrical signals become meaningful, follow the Ethernet protocol, mac features, broadcast work (so that all computers can receive signals)
Network Layer: IP subnet and the network address code is calculated
A host location mac identify a local area network, ip identifies a local area network
Transport Layer: tcp / udp protocol, ip and port bundle is positioned only program
Application layer: applications, application software is running, triggered by a mouse or cmd
Data is generated by the application layer, and then the respective layer packet
According to the programming socket interface function calls, socket hidden tcp, udp protocol, the program follows the tcp, udp protocol standard
Communication is a communication, port interface between the application and the application
The underlying principle of
ACK-- "acknowledgment character SYN--" handshake FIN-- "disconnect signal
tcp: Four waving three-way handshake
General server to disconnect, in order to save resources