Linux network programming-1. Introduction to Linux Network Knowledge

Source: Internet
Author: User
Tags localhost 8888
Article title: Linux network programming-1. Introduction to Linux network knowledge. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
1.1 client and server programs
The biggest difference between a network program and a common program is that a network program consists of two parts: the client and the server.

A network program starts a server program and waits for the client program to run and establish a connection. Generally, the server program listens on a port until a client program sends a request.

1.2 Common commands
The network program is composed of two parts, so it is troublesome to debug. Therefore, we need to know some common network commands.

Netstat
The netstat command is used to display network connection, route table and interface statistics, and other network information. netstat has many options. the commonly used option is-an to display the detailed network status. for other options, we can use the help manual for details.

Telnet
Telnet is a remote control program, but we can use this program to debug our server program. for example, if our server program is listening to port 8888, we can use telnet localhost 8888 to check the server status.

1.3 Introduction to TCP/UDP
TCP (Transfer Control Protocol) is a connection-oriented Protocol. when our network programs use this Protocol, the network ensures that the connection between our client and the server is reliable and secure.

User Data Protocol (UDP) is a non-connection-oriented Protocol, which cannot ensure that the connection of our network programs is reliable, therefore, the program we write now generally uses the TCP protocol.





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.