Basic concepts of computer network programming

Source: Internet
Author: User

Network:

A computer network consists of a group of machines that are interconnected by communication channels. We refer to these machines as hosts (hosts) and routers (routers).  


Routing:

The purpose of the router is to transmit or forward information from one communication channel (forward) to another communication channel.


Channel:

Communication channel (CommunicationChannel) for interpretation: it is a means of transmitting a sequence of bytes from one host to another, possibly a cable cable, such as Ethernet (Ethernet), or wireless, as wifi[], or other means of connection.


message:

The information here (information) refers to the sequence of bytes created and interpreted by the program. In a computer network environment, these byte sequences are called packet packets (packets). A set of messages includes control information that the network uses to complete its work, and sometimes includes user data. The information used to locate the destination address for packet packets is an example. These control information is used by routers to enable the forwarding of each message .


protocol:

Protocol (protocol) is the equivalent of an agreement between the programs that communicate with each other, which specifies the way in which packet packets are exchanged and the meanings they contain. A set of protocols specifies the structure of the packet packet (for example, which part of the message indicates its destination address) and how the information contained in the message is parsed. Design a set of protocols, usually to solve a particular problem under certain constraints. For example, the Hypertext Transfer Protocol (HTTP,hypertext Transfer Protocol) is designed to address the issue of passing hypertext objects between servers, which are created and stored in the server and by the Web The browser is visualized to make it useful to the user. An Instant Messaging protocol is designed to allow two or more users to Exchange short text messages.





Set of bytes:

The set of bytes is the abstract application programming interface provided by the Java language in order to implement program communication.

Communication is achieved by binding the port to the nested byte.

Address:

ip+ Port


There are two types of IP addresses: ipV4 and Ipv6,ipv4 have 32-bit, IPv6 have 64-bit

IPv4 is usually expressed as a point distribution, divided into 4 decimal digits, each corresponding to 8 bits, the range is 0-255 for example: 10.1.2.3

Each IP address represents a connection between a host and the underlying communication channel, which is the network interface.


If the address represents the building, then the port number represents the room, each port number is associated with an IP, the port number range is 1-65535


Special IP Address:

Loopback Address: A virtual device that simply sends the message back to the sender 127.0.0.1

Private address: Originally designed for the private network, not belonging to the public Internet, can be connected to the Internet through a NAT device, but the public network is inaccessible

                                                                                               10, 172, 192.168.


URL parsing

It is more convenient to use the name than to use the ip+ port, and the IP changes are hidden from the user and accessed by name through the following process:

The name resolution service can obtain information through various sources of information, primarily through the DNS domain Name system and the local configuration database


Basic concepts of computer network programming

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.