Basic knowledge of network programming
What is called computer network, is the distribution of computers in different geographical regions and specialized external equipment communication lines interconnect into a large-scale, powerful network system.
The computer network mainly can do the following functions:
1) resource sharing
2) information transmission and centralized processing
3) Balanced load and distribution processing
4) Comprehensive Information Services
The computer network is divided according to size and extension range:
1) Local area network (LAN)
2) metropolitan Area Network (man)
3) wide area network (WAN)
The computer network is divided according to the topological structure of the network:
1) Star-type network
2) Total Linetype Network
3) Loop Network
4) tree-type network
5) Star Loop Network
...
The computer network is divided according to the transmission medium of the network:
1) Twisted pair cable
2) Coaxial Cable
3) Optical fiber
4) satellite
...
What is a communication protocol, a communication protocol is a reservation for communication in a computer network.
Communication protocols are usually made up of three parts:
1) Semantic part: Determine the type of dialogue between the two sides
2) Grammatical part: the way to decide the dialogue between the two sides
3) Transform rules: Determine the correspondence between the two sides of the communication
The International Organization for Standardization ISO in 1978 proposed the "Open Systems Interconnect Reference Model", OSI (open System interconnection).
The Open System Interconnection Reference Model divides the computer network into physical layer, data link layer, network layer, transport layer, Session layer, presentation layer, Application layer seven layer. Shows the recommended layering of the OSI Reference Model:
IP protocol, also known as Internet Protocol, is a datagram protocol that supports inter-network interconnection. TCP protocol (transmission Control Protocol), which is the TCP/IP protocol, is used to collectively refer to these two protocols
The following are the corresponding relationships between the TCP/IP protocol model and the ISO seven layer model:
An IP address is used to uniquely identify a communication entity in the network.
A port is a 16-bit integer that represents which communication program the data is given to handle. The port number can be from 0 to 65535, divided into three categories:
1) Recognized ports: from 0 to 1023, they are used for a number of specific services
2) Register port: from 1024 to 49151 for binding some services
3) Dynamic and private ports: from 49152 to 65535, is the dynamic port of the application.
Reprint Please specify source :http://blog.csdn.net/hai_qing_xu_kong/article/details/40780899 Emotional Control _
Java Network Programming Note 1