STA mode application of ESP32 WIFI & regulating Bluetooth and WIFI transmission power
The following definitions of relevant API interfaces can be viewed in l Lexin's official website: Wi Fi Library - ESP32 - ESP-IDF programming guide v4 4 documents
STA mode configuration process:
#include <string.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/event_groups.h"
#include "esp_system.h"
#inclu ...
Added by munsiem on Thu, 10 Feb 2022 09:38:13 +0200
The realization of forging udp package and binding network card to send data under linux
1. Include header file
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <string.h>
#include <time.h>
#include <stdlib.h>
#include <stdbool.h>
#include <net/if.h>
2. Set src and dest, and define a global socket at ...
Added by pppppp on Wed, 09 Feb 2022 22:38:02 +0200
Advanced programming in Unix environment chapter16 network IPC: socket
chapter16 network IPC: socket
socket descriptor
To create a socket, call the socket function
/*
domain: Communication domain
type: socket type
protocol: agreement
*/
int socket(int domain,int type,int protocol); //If successful, the file (socket) descriptor is returned
Socket communication domain is divided into:
fielddescribeAF_I ...
Added by wholetthe15 on Wed, 09 Feb 2022 12:49:40 +0200
java socket for communication programming [2] - continuous communication and multithreaded communication
The previous section talked about the simple communication between the server and client of java socket, and learned about the communication mechanism of socket. See the following for details: java socket for communication programming
Today, let's go further. There is a problem in the previous example, that is, sending messages only once ends. ...
Added by feckless on Sat, 05 Feb 2022 20:49:22 +0200
Linux multithreaded programming
Create and end threads
pthread_create
#include <pthread.h>
/* Create a new thread, starting with execution of START-ROUTINE
getting passed ARG. Creation attributed come from ATTR. The new
handle is stored in *NEWTHREAD. */
extern int pthread_create (pthread_t *__restrict __newthread,
const pthread_attr_t *__restrict __at ...
Added by benreisner on Thu, 03 Feb 2022 20:09:46 +0200
Linux multiprocess programming
fork system call
#include <sys/types.h>
#include <unistd.h>
/* Clone the calling process, creating an exact copy.
Return -1 for errors, 0 to the new process,
and the process ID of the new process to the old process. */
extern __pid_t fork (void) __THROWNL;
Each call of this function returns twice. In the parent process, t ...
Added by brettpower on Thu, 03 Feb 2022 15:06:32 +0200
Linux server timer
The third type of events that network programs need to deal with is timing events, such as regularly detecting the active state of a customer connection. Server programs usually manage many timing events. Therefore, effectively organizing these timing events so that they can be triggered at the expected time point without affecting the main log ...
Added by sell-traffic on Thu, 03 Feb 2022 07:14:41 +0200
C + + hand training project (simple HTTP webserver based on muduo network library + mysql+jsoncpp for web page display database background data)
Project introduction
Project github: github link This project is based on C + + language, Mr. Chen Shuo's muduo network library, mysql database and json CPP. The server listens to two ports, one for processing http requests and the other for processing json data sent. This project cooperates with a qt+opencv license plate recognition front ...
Added by clarky08 on Wed, 02 Feb 2022 03:21:07 +0200
Qt common wheel collection (with Demo)
Public wheels / API
It mainly stores global variables, configuration variables, some public method codes, user-defined logs, and redirects the output of Qt compiler information to local files.
Log Library
It is built to use mvlog library, cross platform general library and simple singleton mode. At the same time, it can redirect and output ...
Added by bbxrider on Tue, 01 Feb 2022 16:01:21 +0200
java socket for communication programming
Recently, I'm thinking about the implementation principle of some software and studying how those popular software are developed. It's quite interesting. Reviewing the software used every day, I found that the most commonly used software should be communication software, such as wechat and nailing. So I wondered how these communication software ...
Added by rodrigocaldeira on Sun, 30 Jan 2022 10:02:40 +0200