Basic concept of socket and network protocol model

Source: Internet
Author: User

Basic socket concepts

Stream)

Connection)

Blocking and non-blocking)

 

Synchronous and asynchronous)

IP address

The IP address is the unique IP address identifier in the Internet.

The IP address is a 32-bit long (to be expanded to 128 bits)
Each Internet package must contain an IP address

Use the dotted-decimal Notation:
Separate the four-byte numbers of the IP address in decimal format with dots, for example, 202.112.58.200 (0xca703ac8)

 

Subnet Mask (subnet mask)

It is also represented in dotted decimal format, for example, 255.255.0.0.

It is used to specify the subnet (LAN) range. The subnet range can be obtained by performing operations on the mask and the IP address.

For example, the IP address 166.111.160.1 and 166.111.161.45, subnet mask: 255.255.254.0, so the two IP addresses are in the same subnet.

Byte order:

There are two types of byte sequence: nbo and HBO.

Network byte order ):
It stores data in a sequence from high to low and uses a unified network byte sequence on the network to avoid compatibility issues.

Host byte order (HBO, host byte order ):
HBO varies with different machines and is related to CPU design.

For example, the Motorola 68k series, HBO and nbo are the same, intel X86 series, and HBO is opposite to nbo.

Comparison Between OSI model and TCP/IP protocol in ISO/OSI Layer-7 protocol model

Http://www.aka.org.cn/Lectures/002/Lecture-2.1.8/Lecture-2.1.8/new_page_1.htm

For details, refer to the socket mode with continuity and orderliness.

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.