Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Posts about Swoole

Introduction to Swoole

May 14, 2021 17:00 0 Comment Swoole

The socket section, The socket section, The IO event loop, Multi-process/multithreaded, EventFd, Timerfd, SIgnalfd, Introduction to Swoole, Swoole is an extesion extension running under PHP, which is, actually different from a normal extension. A, normal extension s

Swoole contains modules

May 14, 2021 17:00 0 Comment Swoole

swoole_server, swoole_server, swoole_client, swoole_event, swoole_async, swoole_process, swoole_buffer, swoole_table, swoole_server, Powerful TCP/UDP Server Framework, Multithreaded, EventLoop, EventLoop, Event Driver, Asynchronous, Worker Process Group, Task Asynchro

Swoole environment dependency

May 14, 2021 17:00 0 Comment Swoole

PhP version dependent, PhP version dependent, The recommended Linux distribution, ARM Platform (Raspberry Pi Raspberry PI), MIPS Platform (OpenWrt Router), CygWin Environment Support (Windows Systems), BashOnWindows, Swoole environment dependency, Only Linux, FreeBSD, MacOS, Class 3 operating systems are supported, Linux kernel version 2.3.32 or more, PhP5.3.10 or

Swoole compiles the installation

May 14, 2021 17:00 0 Comment Swoole

Swoole compiles the installation steps, Swoole compiles the installation steps, The installation is ready, Download the address, PECL, Configure php .ini, make or make install could not be executed or compiled incorrectly, The mysql header file is missing, The pcre.h header file is missing, Cannot find autoconf, make install failed, After modifying the php .ini, there is no swoole in php -m or phpinfo, error: too many arguments to function 'zend_exception_error', What if compilation fails?, Swoole compiles the installation steps, The Swoole extension was built according to the php standard extension., Use phpize to generate php compilatio

Swoole base instance creation

May 14, 2021 17:00 0 Comment Swoole

Swoole base instance creation, Build a basic instance of Swoole, Here's a basic swoole-based echo server, // Server, class Server, {, private $serv;, public function __construct() {

What you need to know about Swoole programming

May 14, 2021 17:00 0 Comment Swoole

Precautions, Precautions, Classes/functions are repeatedly defined, Memory management, Process isolation, The instance program, The instance program, Programming information, This channel details the differences between asynchronous programming and synchronous programming and what needs to be noted.

Swoole optimizes kernel parameter adjustment

May 14, 2021 18:00 0 Comment Swoole

ulimit settings, ulimit settings, Kernel settings, Message queue settings, FreeBSD/MacOS, Turn on CoreDump, Other important configurations, See if the configuration is in effect, Swoole optimizes kernel parameter adjustment, ulimit settings, ulimit -n to be adjusted to 100,000 or more. U, limit -n 100,000 can be modified by exe

Swoole server configuration options

May 14, 2021 18:00 0 Comment Swoole

Swoole server configuration options, In swoole, a related property swoole_server a file can pass, $serv->set( $array configs );, functions to configure, and these configuration options ma

Swoole server event callback function

May 14, 2021 18:00 0 Comment Swoole

Swoole server event callback function, In swoole, a swoole_server has several callback functions that determine the relevant functions swoole_server the system., Can be done, $serv->on( str

List of Swoole server functions

May 14, 2021 18:00 0 Comment Swoole

swoole_server::__construct, swoole_server::__construct, swoole_server::set, swoole_server::on, swoole_server::addlistener, swoole_server::handler, swoole_server::start, swoole_server::reload, swoole_server::shutdown, swoole_server::addtimer, swoole_server::deltimer, swoole_server::after, swoole_server::close, swoole_server::send, swoole_server::sendfile, swoole_server::connection_info, swoole_server::connection_list, swoole_server::stats, swoole_server::task, swoole_server::taskwait, swoole_server::finish, swoole_server::heartbeat, swoole_get_mysqli_sock, swoole_set_process_name, swoole_version, swoole_strerror, swoole_errno, swoole_get_local_ip, swoole_server list of functions, Table of Contents, swoole_server::__construct, swoole_server::set, swoole_server::on, swoole_server::addlistener, swo

Swoole Server instance

May 14, 2021 18:00 0 Comment Swoole

Build a server object, Build a server object, Set runtime parameters, Register the event callback function, Start the server, The list of properties, Run the flowchart, Process/thread structure diagram, Simple Swoole tcp server instance:, Introduction to Swoole Server, Create an asynchronous server program that supports TCP, UDP, UnixSocket 3 protocols, IPv4 and IPv6, and tunnel encrypt

Swoole Client instance

May 14, 2021 18:00 0 Comment Swoole

Synchronized blocking clients, Synchronized blocking clients, Asynchronous non-blocking clients, Introduction to Swoole Client, swoole_client provides the encapsulation code for the tcp/udp socket client, which requires only a new swoole_client us

Swoole HttpServer instance

May 14, 2021 18:00 0 Comment Swoole

A simple example:, A simple example:, nginx-swoole configuration, Enable the Http client, The construction method, About Swoole HttpServer, swoole-1.7.7 adds support for the built-in Http server, which can be written out of an asynchronous non-blocking multi-proces

Swoole WebSocket instance

May 14, 2021 18:00 0 Comment Swoole

A simple example:, A simple example:, OnRequest callback, Client, Introduction to Swoole WebSocket, swoole-1.7.9 adds built-in websocket server support to write an asynchronous non-blocking multi-process WebSocket se

Swoole Redis Server instance

May 14, 2021 18:00 0 Comment Swoole

Available clients, Available clients, Compile and installhiredis, Enable asynchronous Redis clients, A simple example:, Introduction to the Swoole Redis/Server asynchronous client, The Swoole-1.8.14 version adds a Server framework compatible with the Redis server-side p