Realize the chat room based on Linux socket from 0 - realize the login and registration function of the chat room - 3

In the previous article, we have talked about how to build a multi-threaded server model, which can support multiple clients to connect to the server at the same time. In this article, we will realize multiple clients, how to register information with the server and realize the function of login. data structure Then, the example code of the pre ...

Posted by mharju on Tue, 17 May 2022 20:25:37 +0300

About CentOS 7, divide part of the home directory into the root directory

1, Basic concepts Cent0S 7 enables LVM2 (Logical Volume Manager) by default, and divides a hard disk of the machine into two areas sda1 and sda2, in which sda1 is mounted as a system disk / boot with a small amount of space; Sda2 acts as a physical volume and completely as a Logical Volume group VG(Volume Group) centos. In this Logica ...

Posted by bharanikumarphp on Tue, 17 May 2022 14:45:00 +0300

How to get Docker images to take off, so simple to set up

I. Introduction Docker is great to use, especially when it comes to DevOps practices. However, when you pull mirrors in China or locally, you often encounter various "constipation" - either the mirror pull is slow, or the connection is intermittent, or the connection times out! When our images are large (like someone dropped a Warcr ...

Posted by genom on Tue, 17 May 2022 13:01:00 +0300

Operating system process scheduling experiment report

1. Implement four different and process scheduling algorithms: First come first service, time slice rotation, priority scheduling and short job priority scheduling algorithms. 2. Understand the concepts of process control block and process queue through experiments. 1. Run the code in the material and observe whether the execution result i ...

Posted by Sk8Er_GuY on Tue, 17 May 2022 03:39:12 +0300

Git common commands

Git common commands New code base git clone Create a new Git repository in the current directory $ git init Create a new directory and initialize it as a Git repository $ git init [project-name] Download a project and its entire code history $ git clone [url] configure git config Git's setting file is .gitconfig, which can be in t ...

Posted by mr_tron on Mon, 16 May 2022 23:48:59 +0300

Bash trick: Shell script that can move and rotate Tetris left and right

In Linux bash, the previous article introduced a shell script that uses the k, j, h, l keys to move a single block up, down, left, and right. The following continues to describe how to rotate a single block. Execution effect The specific implementation effect is as follows: Screenshot before rotation Screenshot after moving and rotating When ...

Posted by hammadtariq on Mon, 16 May 2022 21:58:38 +0300

(detailed) distributed architecture: preliminary study on Nignx installation, use and load balancing

Forward proxy Proxy is the client. When the client needs to access the remote server, sometimes the intermediate proxy server is used to replace the client access. The client needs to make certain settings (similar to connecting to the Internet with VPN) Reverse proxy The proxy is that the server processes the response of the target serv ...

Posted by cool75 on Mon, 16 May 2022 16:50:33 +0300

Common commands for Linux - 04

Basic format of command 1. Command prompt [root@localhost ~] # []: This is the separator of the prompt and has no special meaning. root: displays the current login user @: separator, no special meaning Localhost: the short host name of the current system (the full host name is localhost.localdomain). ~: represents the current directory of ...

Posted by itpvision on Mon, 16 May 2022 10:32:50 +0300

Modifying IP and turning off firewall in Linux

1. Linux network related concepts and methods of modifying IP address 2. Turn off the firewall and set whether to start or not Linux network related concepts and methods of modifying IP address 1.1 naming rules of network card The network card naming method of CENTOS6: it will be changed according to the situation rather than unique and fixed ...

Posted by joeman3429 on Mon, 16 May 2022 05:54:52 +0300

UNIX Advanced Environment Programming Learning Notes 6_ Process Control

1. Function fork Function prototype: #include<unistd.h> pid_t fork(void); The fork function creates a subprocess and returns it twice. Child process ID and 0, respectively. It is equivalent to copying the same process and executing it at the point where fork is called while the program is running. It has two main purposes: 1. Parent a ...

Posted by hoopplaya4 on Sun, 15 May 2022 22:01:01 +0300