Remember a weird TCP hand-waving disorder problem

The content of this article includes but is not limited to: tcp four waves (closed at the same time), seq/ack number rules of tcp packets, tcp state machine, kernel tcp code, tcp sending window and other knowledge. What is the problem? Kernel version linux 5.10.112 In a sentence: During the four waves, due to the […]

TCP IP network programming (7) Understand the use of select and epoll

Article directory Understand the select function Function and calling sequence of select function Set file descriptor Set monitoring range and timeout select function call example Better than select’s epoll Select-based I/O multiplexing is slow Necessary functions and structures when implementing epoll epoll_create epoll_ctl epoll_wait Server side based on epoll Edge triggering and level triggering Understanding […]

python and PLC communication (Ethernet modbustcp)

To establish communication with a PLC in Python, you usually need to perform the following steps: 1. Determine the communication protocol of the PLC: Different PLC manufacturers and models may use different communication protocols, such as Modbus, OPC UA, Profinet, etc. Please first determine which communication protocol your PLC uses (this article is modbustcp). 2. […]

[Unity Network Communication] Teach you how to use TCP and UDP protocols in one step

An article about Unity acting as both client and server Communication protocol TCP, UDP There are many repeated methods on the server side. Interested friends can write them as base classes to reduce the repetition rate. 1. Preface Achieve sending specified commands through TCP or UDP protocol, and the receiving end performs operations related to […]

38 | WebSocket: TCP in the Sandbox

When I talked about the TCP/IP protocol stack before, I said that there is “TCP Socket”, which is actually a functional interface through which the TCP/IP protocol stack can be used to send and receive data at the transport layer. So, did you know that there is another thing called “WebSocket”? Judging from the names […]

Netty+SpringBoot creates a TCP long connection communication solution

The path to growth as a programmer Internet/Programmer/Technology/Data Sharing focus on This article should take approximately 12 minutes to read. From: blog.csdn.net/u013615903/article/details/129044283 Background of the project text 1. Project structure 2. Project module 3. Business process 4. Detailed explanation of code 5. Test 6. Source code postscript Project background Recently, an Internet of Things project […]

Cross-compile your own TcpDump tool

Foreword Everyone must have heard or used network packet capture tools, such as the powerful WireShark, which supports Window and Linux platforms; and the TcpDump command line tool for Linux systems. As an embedded development engineer, during the development process, it is inevitable that there will be no graphical interface. Under the Linux system, you […]

Encapsulation of socket communication classes (including error handling, read and write processing, communication processing, TCP sticking problem)

1. Encapsulation based on C language TCP-based socket communication is divided into two parts: server-side communication and client-side communication. As long as we master the communication process, it is easy to encapsulate the corresponding functions. Let’s review the communication process first: Service-Terminal Create a listening socket Bind the listening socket to the local IP and […]