current location:Home > Technical Articles > PHP Framework > Swoole
- Direction:
- All Web3.0 Backend Development Web Front-end Database Operation and Maintenance Development Tools PHP Framework Daily Programming WeChat Applet Common Problem Other Tech CMS Tutorial Java System Tutorial Computer Tutorials Hardware Tutorial Mobile Tutorial Software Tutorial Mobile Game Tutorial
- Classify:
-
- What protocol does swoole use?
- Swoole has implemented a data cache area at the bottom layer, and has built-in several commonly used protocol types, such as the EOF terminator protocol and the fixed header plus body protocol. A fixed set of strings /r/n that will not appear in normal data are used as markers for the split protocol, which is called the EOF protocol.
- Swoole 2611 2019-12-06 10:44:45
-
- How to use swoole event
- Swoole\Server is an event-driven model, and all business logic code must be written in the event callback function. All event callbacks occur after $server->start; the last event when the server shutdown program terminates is onShutdown.
- Swoole 2049 2019-12-06 10:31:40
-
- How to use swoole constants
- swoole uses a constant, Client::MSG_WAITALL, for the second parameter of the Client->recv() method, blocking and waiting until data of the specified length is received before returning.
- Swoole 2576 2019-12-06 10:12:58
-
- How to use swoole
- Swoole is written in pure C language and provides asynchronous multi-threaded server in PHP language, asynchronous TCP/UDP network client, asynchronous MySQL, asynchronous Redis, database connection pool, AsyncTask, message queue, millisecond timer, asynchronous file reading and writing, asynchronous DNS query.
- Swoole 3202 2019-12-06 10:06:32
-
- How to restart swoole smoothly
- In swoole, we can send various signals to the main process, and the main process performs different processing according to the type of signal received. SIGUSR1 will restart all Worker processes smoothly; SIGUSR2 will restart all Task processes smoothly.
- Swoole 3575 2019-12-06 09:58:13
-
- How to set timer in swoole
- To set the timer, swoole can use its own JavaScript setInterval/setTimeout asynchronous high-precision timer, with a granularity of milliseconds. It's also very simple to use.
- Swoole 2326 2019-12-06 09:50:46
-
- How to install swoole in docker
- How to install swoole with docker: 1. Use the docker pull php command to download the PHP image, and then use the docker command to create the container. 2. Use docker to install swoole in the container.
- Swoole 6272 2019-12-06 09:47:56
-
- What swoole can do
- Swoole can be widely used in the Internet, mobile communications, enterprise software, cloud computing, online games, Internet of Things (IOT), Internet of Vehicles, smart homes and other fields. Using PHP + Swoole as a network communication framework can greatly improve the efficiency of enterprise IT R&D teams.
- Swoole 2419 2019-12-06 09:40:40
-
- How to use swoole task
- Swoole is implemented by the worker process processing the data request and assigning it to the task process for execution. Swoole asynchronous task mainly implements the execution of calling asynchronous tasks. The bottom layer of the task uses Unix Socket pipe communication, which is full memory and has no IO consumption.
- Swoole 3017 2019-12-06 09:26:16
-
- what is swoole fd
- swoole fd is the file descriptor of the TCP connection, which is the unique identifier of the client in swoole_server; fd is reused, and when the connection is closed, the fd will be reused by the new incoming connection; the TCP connection fd being maintained will not be reused. use.
- Swoole 3535 2019-12-06 09:16:03
-
- The reason why swoole is higher than go
- Go's processing of IO events is single-threaded, unable to utilize multiple cores, and its throughput is slightly weaker than swoole; in the actual TCP/UDP intensive IO stress test, swoole performed slightly better than go. swoole uses multi-threaded eventloop to handle IO events, and multiple processes execute user-level PHP code.
- Swoole 4357 2019-12-06 09:08:04
-
- Why is swoole better than php?
- Compared with apache/fpm, the swoole framework mainly saves the performance loss caused by the creation and destruction of each request of the PHP framework and global objects. The swoole framework provides programmers with the greatest space, and global objects unrelated to http requests only need to be constructed once. Cache control of certain objects and data can also be performed in the program.
- Swoole 3316 2019-12-05 14:41:40
-
- How to upgrade swoole in php
- We can check the swoole version through the php --ri command, compile and upgrade, and only need to download the latest stable version from the pecl official website, which is equivalent to reinstalling the new version. To upgrade pecl, use the pecl upgrade swoole command.
- Swoole 4469 2019-12-05 14:18:37
-
- How to enable swoole extension in PHP
- After downloading the Swoole extension source code, compile and install it according to the standard PHP extension compilation method. After compilation and installation, modify php.ini and add extension=swoole.so to enable the swoole extension.
- Swoole 3805 2019-12-05 14:10:12
-
- How to install swoole extension in phpstudy
- Download the swoole extension and unzip it; cd swoole-src-swoole-1.7.9-alpha, sudo vi /root/.bashrc; Add export PATH=/phpstudy/server/php/bin:$PATH to the last line
- Swoole 13159 2019-12-05 14:01:34