Basic knowledge of network programming

Source: Internet
Author: User

IP: Each host in the network must have a unique IP address, the IP address is a logical address, the IP address on the Internet is globally unique, 32-bit, 4-byte, commonly dotted decimal format representation, such as 192.168.0.200.

Protocol: Rules, standards, or conventions (= semantics + syntax + rules) established for data exchange (communication) in the network, with different protocols for each layer.

Poor: Data transmitted over the Internet contains the IP address and port number that are useful to identify the destination. The IP address is used to identify the computer on the network, and the port number is used to indicate the application on that computer.

TCP:TCP is the abbreviation for Transfer Control protocol and is a connection-oriented protocol for reliable transmission. With the TCP protocol transmission, a sequential error-free data stream is obtained. A connection must be established between the sender and the receiver's paired two sockets to communicate on the basis of the TCP protocol, and when a socket (usually a server socket) waits for a connection, the other socket can require a connection. Once the two sockets are connected, they can carry out two-way data transfer and both can send or receive operations. TCP is a connection-based protocol that can provide reliable data flow between two computers. This reliable communication channel is required for applications such as HTTP, FTP, and Telnet.

UDP:UDP is the abbreviation of the user Datagram protocol, is a non-connected protocol, each datagram is a separate information, including the full source address or destination address, it is on the network with any possible path to the destination, so can reach the target, The time to reach the destination and the correctness of the content are not guaranteed. UDP is the protocol that sends a separate packet, called a datagram, from one computer to another, and does not guarantee that the datagram will arrive at the destination correctly. It is a non-connection-oriented protocol.

Basic knowledge of network programming

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.