Get Started

4.x is outdated, please check the latest version 22.x


Latest version: pecl install openswoole-22.1.2

Get Started

Before Installing
Class Alias
Installation Guide

Server

TCP/UDP Server

Server provides the API to write TCP / UDP / UnixSocket Servers.

HTTP Server

HTTP Server provides the API to write HTTP servers.

WebSocket Server

WebSocket Server provides the API to write WebSocket servers.

Redis API Server

Redis Server provides the API to write TCP servers with Redis protocol.

Multiprocessing

Taking advantage of multicore, you have to use multiple processes in you server or application. You can build multiple processes application easily with the features provided by Swoole.

Process

Process can be attached and managed by Swoole Server with addProcess API.

Process Pool

It can be used to manage a group of worker processes to process messages in MQ like Redis or sent from client side.

Atomic

Atomic can be used for interprocess variable synchronization.

Lock

Lock can be used for data synchronization between multiple processes.

Table

Table is a high performance memory management module, implemented based on shared memory and spin lock. It can be used by multiple processes: worker process or task worker process.

Coroutine

Concurrency with PHP Conroutine. Coroutine is the mainstream since Swoole version 4.0, although the async style API is supported by extension ext-async, Coroutine style API is recommended.

Coroutine Channel
Coroutine run
Coroutine Client
Coroutine HTTP Client
Coroutine HTTP2 Client
Coroutine Redis Client
Coroutine MySQL Client
Coroutine Postgres Client
Coroutine Socket
Coroutine Library
EventLoop
Last updated on August 31, 2022