Linux multi-threaded network communication

Idea: When the main thread (only one) establishes a connection, a child thread is created. The child thread starts communication. Shared resources: global data area, heap area, kernel area descriptor. The need for thread synchronization or non-synchronization depends on the thread’s operation of data in the shared resource area. If it is read-only, it is […]

react-component communication (redux)

Component communication Parent-child component communication Communication between parent and child components in Vue, parent passes to child: props, child component notifies parent component: this.$emit In react, parent-child component communication Pass from parent to child: use props attribute to pass The child component notifies the parent component to modify the data by calling the function passed […]

lv7 Embedded Development-Network Programming Development 09 UDP Communication

Table of Contents 1 Related APIs used 1.1 write/read to send/recv 1.2 sendto and recvfrom 2 Implementation process of UDP communication 3 Server code, client, makefile code implementation 1 Related API used 1.1 write/read to send/recv send function prototype: ssize_t send(int sockfd, const void *buf, size_t len, int flags); The send() function is used to […]

Detailed analysis of UDP communication program

2.UDP communication program 2.1 UDP sending data UDP communication in Java The UDP protocol is an unreliable network protocol. It establishes a Socket object at each end of the communication. However, these two Sockets are only objects for sending and receiving data. Therefore, for both parties communicating based on the UDP protocol, there is no […]

A complete collection of Linux instructions (file and directory operations, file content viewing and editing, system information and management, network and communication, compression and decompression, permission management, package management…)

Table of Contents Preface VMware 16.2.4 + Ubuntu18.04 Install WSL on Windows 11 A complete collection of Linux commands 1. File and directory operation instructions cd: change the current directory ls: list directory contents mkdir: Create a new directory rm: Delete a file or directory cp: copy files or directories mv: move files or directories […]

Springboot integrates Grpc to realize communication between services

1. Introduction to Grpc In gRPC, the client applicationcan directly call the method of the server application on a different machine just like calling a local object, allowing you to Make it easier to create distributed applications and services. Similar to many RPC systems, gRPC is also based on the following concept: define a service […]

GD32F103x IIC communication

1. IIC communication 1.Introduction to IIC The IIC bus has two serial lines, one is the clock line SCK (synchronization), and the other is the data line SDA. Only one data line is Half-duplex. In applications, the microcontroller often serves as the host, and multiple peripheral devices can be mounted. (Of course, there can be […]

Communication project case based on ModbusTCP and Siemens PLC

Table of Contents 1. Construction of Siemens PLC simulation environment 【1.1】Create PLC project 【1.2】Writing PLC program 2. C# code writing 【2.1】Window production 【2.2】Effect Demonstration 【2.3】Read source code 【2.4】FrmSiemensSet source code 【2.5】Variable source code 1. Construction of Siemens PLC simulation environment [1.1] Create PLC project Build PLCSIM-Advacend simulation Set the IP address of the PLC to […]

uCOSIII real-time operating system 2 Synchronization and communication

Table of Contents Synchronization concept: Mutually exclusive concepts: Critical section concept: Task time concept: Semaphore concept: Mutually exclusive semaphore concept: Event flag group concept: Message mailbox and message echelon concepts: Memory management concepts: How to switch from bare metal development to OS programming: Polling system: Front and backend systems: Multitasking system: Synchronization concept: Tasks are […]