Internet of things training notes_ Network programming

Internet of things training notes_ Network programming Basic concepts of network programming: 1. Computer network A computer network is a collection of interconnected independent computers, The simplest form of network consists of two computers. 2. Network communication IP address: 1. Each host in the IP network must have a unique IP a ...

Posted by kid_drew on Fri, 24 Sep 2021 16:46:28 -0700

One line of code to solve the problem of slow scp transmission over the Internet

Encountered a late case, using scp to transfer files over a long link is unbearably slow! For a 100-200 ms round-trip delay link, wget can download files with a throughput of 40MBps, while scp has only 9MBps. I started to think this was due to bandwidth loss for encryption, but HTTPS testing was okay. To avoid pacing smoothing edge events, se ...

Posted by pixy on Fri, 24 Sep 2021 14:52:44 -0700

Ethernet frame analysis (Ethernet II, Ethernet 802.3 raw, IEEE 802.3, Ethernet IEEE 802.3 SNAP)

The data link layer (layer 2) of OSI model is actually composed of two sublayers: media access control (MAC) sublayer and logical link control (LLC) sublayer. MAC sublayer controls device interaction. The LLC sublayer handles addressing and multiplexing. The physical addressing of the network connection exists at the data link layer. The proto ...

Posted by austenr on Tue, 21 Sep 2021 16:48:31 -0700

Socket Programming for TCP and UDP

This paper mainly talks about how to use Socket to communicate between server and client based on TCP and UDP, the communication flow and some details in the code, and the differences and reasons between them in the code. Catalog 1. Socket 2. Communications via TCP Server Side Create Welcome socket Create a dedicated socket Reading data ...

Posted by slipmatt2002 on Tue, 21 Sep 2021 09:14:06 -0700

Implementation of Linux Network IO basic components

1 theoretical basis components 1.1 Epoll model overview 1.1.1 advantages of epoll model over Select/poll model (1) The maximum number of descriptors that Epoll can use will depend only on memory in a linear relationship (2) IO efficiency does not decrease linearly with the increase of the number of descriptors, mainly due to the callback ...

Posted by cryp7 on Tue, 21 Sep 2021 00:57:02 -0700

Working principle and code of socket communication

Question: 1. What is the socket communication mechanism? The official explanation is: The most commonly used scheme in network programming is the client / server model. In this scenario, the client application requests services from the server program. A service program usually listens for requests for services at a well-known address, that is, ...

Posted by andynick on Mon, 20 Sep 2021 05:41:02 -0700