# 框架
[TOC]
## Swoft:基于 Swoole 原生協程的新時代 PHP 全棧式協程框架
[https://github.com/swoft-cloud/swoft](https://github.com/swoft-cloud/swoft)
首個基于 Swoole 原生協程的新時代 PHP 高性能協程全棧框架,內置協程網絡服務器及常用的協程客戶端,常駐內存,不依賴傳統的 PHP-FPM,全異步非阻塞 IO 實現,以類似于同步客戶端的寫法實現異步客戶端的使用,沒有復雜的異步回調,沒有繁瑣的 yield,有類似 Go 語言的協程、靈活的注解、強大的全局依賴注入容器、完善的服務治理、靈活強大的 AOP、標準的 PSR 規范實現等等,可以用于構建高性能的Web系統、API、中間件、基礎服務等等。
* 基于 Swoole 擴展
* 內置協程 HTTP, TCP, WebSocket 網絡服務器
* 強大的 AOP (面向切面編程)
* 靈活完善的注解功能
* 全局的依賴注入容器
* 基于 PSR-7 的 HTTP 消息實現
* 基于 PSR-14 的事件管理器
* 基于 PSR-15 的中間件
* 基于 PSR-16 的緩存設計
* 可擴展的高性能 RPC
* 完善的服務治理,熔斷,降級,負載,注冊與發現
* 數據庫 ORM
* 通用連接池
* 協程 Mysql, Redis, RPC, HTTP 客戶端
* 協程和同步阻塞客戶端無縫自動切換
* 協程、異步任務投遞
* 自定義用戶進程
* RESTful 支持
* 國際化(i18n)支持
* 高性能路由
* 快速靈活的參數驗證器
* 別名機制
* 強大的日志系統
* 跨平臺熱更新自動 Reload
## easySwoole 高性能HTTP框架
easySwoole 專為API而生,是一款常駐內存化的PHP開發框架,擺脫傳統PHP運行模式在進程喚起和文件加載上帶來的性能損失,自帶服務器功能,無需依賴Apache或Nginx運行。在web服務器模式下,支持多層級(組模式)控制器訪問與多種事件回調,高度封裝了Swoole Server 而依舊維持Swoole Server原有特性,支持在 Server 中監聽自定義的TCP、UDP協議,讓開發者可以最低的學習成本和精力,編寫出多進程,可定時,可異步,高可用的應用服務。
項目地址 :[https://www.easyswoole.com/](https://www.easyswoole.com/)
## MixPHP
[MixPHP](http://www.mixphp.cn/)是一款基于 Swoole 的FPM、常駐內存、協程三模 PHP 高性能框架,MixPHP 秉承 "普及 PHP 常駐內存型解決方案,促進 PHP 往更后端發展" 的理念而創造,采用 Swoole 擴展作為底層引擎,圍繞常駐內存的方式而設計,提供了 HTTP / WebSocket / Console 開發所需的眾多開箱即用的組件,在其他 Swoole 框架都定位于大中型團隊、龐大的 PHP 應用集群的時候,MixPHP 決定推動這項技術的普及,我們定位于眾多的中小型企業、創業型公司,我們將 Swoole 的復雜度封裝起來,用簡單的編碼方式呈現給用戶,讓更多的中級程序員也可打造高并發系統,努力讓 Swoole 不再只是高級程序員的專利。
* * *
## Swoolefy
[swoolefy](https://github.com/bingcool/swoolefy)是一個基于swoole實現的輕量級高性能的常駐內存型的API和Web應用服務框架,高度封裝了http,websocket,udp服務器,以及基于tcp實現可擴展的rpc服務, 同時支持composer包方式安裝部署項目。基于簡單易用,swoolefy抽象Event事件處理類, 實現與底層的回調的解耦,支持swoole原生協程,協程實例應用注冊,組件依賴注入,全局事件注冊,異步任務管理,自定義進程管理,RPC服務,mysql,redis連接池,支持基于自定義進程的redis,rabitmq,kafka的訂閱發布,crontab定時任務等等,讓更多phper能夠高效低成本開發出常駐內存應用服務。
* * *
* [Tencent-TSF](https://github.com/tencent-php/tsf)騰訊公司推出的PHP協程框架,基于Swoole+PHP Generator實現Coroutine,可以像Golang一樣用協程實現高并發服務器。
* [swoole\_framework](https://github.com/matyhtf/swoole_framework)基于swoole擴展開發的通用后端服務框架,包含了內置PHP應用服務器、FastCGI、WebSocket、Web框架等豐富的功能特性
* [LaravelS](https://github.com/hhxsv5/laravel-s)基于Swoole加速Laravel/Lumen,常駐內存,內置HTTP/WebSocket Server,支持TCP/UDP Server、自定義進程、異步的事件監聽、異步任務隊列、毫秒級定時任務、平滑Reload,與Nginx配合搭建高可用分布式服務器群,開箱即用。
* [zphp](https://github.com/shenzhe/zphp)一個極輕的的,專用于游戲(社交,網頁,移動)的服務器端開發框架.提供高性能實時通信方案。zphp使用swoole作為底層網絡通信的框架。
* [zapi](https://github.com/keaixiaou/zapi)基于swoole+generator的http api異步非阻塞輕量級框架,內置mysql、redis、memcached、mongodb全套異步客戶端的連接池,內置http異步客戶端,近乎同步的寫法,卻是異步的調用,性能強悍
* [zhttp](https://github.com/keaixiaou/zhttp)基于swoole+generator的異步非阻塞輕量級web框架,內置mysql、redis、memcached、mongodb全套異步客戶端的連接池,內置http異步客戶端,近乎同步的寫法,卻是異步的調用,性能強悍
* [swoole-yaf](https://github.com/LinkedDestiny/swoole-yaf)結合PHP的Yaf框架和Swoole擴展的高性能PHP Web框架
* [Swoole-Yaf](https://github.com/wenjun1055/swoole-yaf)將Yaf框架和Swoole擴展提供的HttpServer結合在一起,server和框架高度結合形成超高性能的組合
* [ciswoole](https://github.com/smalleyes/ciswoole)CodeIgniter 2.2 with Swoole\_Http\_Server
* [owl-mvc](https://github.com/yeaha/owl-mvc)基于 swoole\_http\_server 的一套PHP MVC框架
* [hprose/hprose-php](https://github.com/hprose/hprose-php)高性能遠程對象調用服務,PHP 版本底層使用 swoole 實現了 http,https,tcp,tcp6,websocket, unix socket 服務器和 tcp,tcp6,unix socket 客戶端。
* [yiiSwoole](https://github.com/kcloze/yiiSwoole)Yii 1.1.16 with Swoole Http\_Server,In high-concurrency situations,will be better than php-fpm
* [Dora-RPC](https://github.com/xcl3721/Dora-RPC)是基礎swoole實現的輕量級高性能RPC框架,支持同步/異步調用,擁有有多任務并發及長鏈接維持特性
* [Blink](https://github.com/bixuehujin/blink)是一個為構建 “long running” 服務而生的 Web 微型高性能框架,它為構建 Web 應用程序提供簡潔優雅的API,盡量的減輕我們的常規開發工作
* [swPromise](https://github.com/coooold/swPromise)基于swoole的PHP promise框架
* [Aurora](https://github.com/zxz054321/aurora)是一個建立在 Lightning 之上的高性能高并發框架,為追求極限性能而打造,底層由Phalcon + Swoole組合驅動,適用于需要支持高并發的場景,如API 接口、微服務等。
* [Group](https://github.com/fucongcong/Group)輕量級框架。基于swoole實現了定時任務,分布式任務隊列,異步多進程服務(模擬map-reduce),結合hprose的rpc服務。
* [Group-co](https://github.com/fucongcong/Group-Co)優雅的異步協程框架,支持服務化搭建高并發httpserver,支持分布式使用,詳情請戳鏈接。
* [FastD](https://github.com/JanHuang/fastD)FastD 是一個支持 Swoole 的輕量級 Web 開發框架,可適用于對性能有要求的 API 場景,并且靈活的擴展性可以讓開發者們更容易地建造自己的服務 (基于Swoole)
* [Yii2-Swoole](https://github.com/tsingsun/yii2-swoole)支持基于Yii2框架運行于Swoole中,同時可以很簡單的支持Swool 1.0與2.0協程,自帶mysql,redis連接池,可以使用Yii2的全棧框架來開發HTTP,WebSocket等網絡服務。
* [ultraman](https://github.com/zoooozz/ultraman)結合PHP的Yaf框架和Swoole擴展的高性能PHP 封裝成composer 及其容易上手
* [Lawoole](https://github.com/lawoole/lawoole)基于 Laravel 和 Swoole 的高性能 PHP 框架。借助 Swoole 的高性能特點,彌補了 Laravel 的性能缺陷。在大幅提升程序運行速度的情況下,能夠使用到絕大部分 Laravel 中優秀的特性。在 Lawoole 中,你可以擁有與 Laravel 一致的開發體驗,編寫那些富有創造力的代碼。
* [CabalPHP](https://www.cabalphp.com/)基于Swoole的**輕量、高效、全異步**開源框架,**自動生成API接口文檔**,IDE下有完整的代碼提示,相較于其他框架我們有完善的協程數據庫和緩存引擎哦!
## MyQEE 服務器類庫
[https://github.com/myqee/server](https://github.com/myqee/server)
MyQEE 服務器類庫是一套基礎服務器類庫,讓你可以摒棄 Swoole 傳統的 On 回調寫法,在不損失性能和功能的前提下實現功能和服務的對象抽象化,實現全新的編程體驗,讓代碼清晰有條理。特別適合復雜的應用服務器,不管是你要在一起集成 Http 還是 Tcp 還是 WebSocket 服務,解決了使用 Swoole 開發復雜服務器的痛點。另外,通過本類庫使得php新手使用 swoole 會變得更輕松不再那么迷茫(比如多端口綁定、任務進程和工作進程的關系和功能)。
MyQEE服務器類庫特性:
* 對象抽象化:為每個 Worker、TaskWorker、以及端口監聽分配一個對象,業務層自己實現相應功能即可,讓開發代碼清晰有條理;
* 填補了 Swoole 服務器開發中的很多坑;
* 支持大文件、斷點、分片上傳功能并完美融合服務(`swoole_http_server`不支持大文件上傳,會有內存問題,也存在一些細節上的bug);
* 易于使用的多重混合服務器端口監聽方案;
* 解決服務器選型痛點;
* 解決代碼混亂的痛點;
* 解決新手搞不清 Worker、TaskWorker 和多端口之間的功能、關系、使用特性;
* 更加簡單易用的熱更新方案;
* 連接池、資源池;
* 更多的周邊功能特性;
## zys高性能服務框架
[https://github.com/qieangel2013/zys](https://github.com/qieangel2013/zys)基于Yaf和Swoole的i高性能Service框架,核心特性:
1. 基于swoole提供分布式服務器通訊服務
2. 基于thrift提供rpc遠程調用服務
3. 基于HTML5提供在線網絡直播平臺服務
4. 基于swoole提供同步異步數據庫連接池服務
5. 基于swoole提供異步任務服務器投遞任務服務
6. 基于vmstat提供服務器硬件實時監控服務
7. 基于yac、yaconf提供共享數據、配置服務
8. 基于zqf提供高并發計數器、紅包、二維碼服務
9. 很好的支持網頁版console的shell服務
10. 基于hprose提供rpc遠程調用、推送等服務
## WebWorker-swoole高性能http服務框架
[https://github.com/xtgxiso/WebWorker-swoole](https://github.com/xtgxiso/WebWorker-swoole)基于Swoole2.0的協程特性寫的框架,核心特性:
1. 實現了簡單路由功能的小巧框架,便于開發者使用和擴展,非常具有靈活性
2. 相比php-fpm或mod\_php的方式性能有幾十倍左右的提升
3. 可設置自動加載目錄加載目錄下的所有php文件(僅一級不支持遞歸)
4. 自定義404響應
5. 支持中間件
6. redis支持原生同步和協程版本,只需要一個配置參數即可
7. mysql支持原生同步和協程版本,只需要一個配置參數即可
## MiniSwoole
[https://github.com/xwmhmily/miniSwoole](https://github.com/xwmhmily/miniSwoole)迷你Swoole
### Write Less and Do More
. Http, TCP, UDP, Websocket 支持
. Controller - Model 分層
. MySQL 連接池及斷線自動重連
. MySQL 分表分庫,全鏈式操作
. Shell 腳本控制服務
. Hooker 與 Worker
. 良好的錯誤提示及類自動Autoload
. PHP 與MySQL 日志分開收集
. 心跳檢測,無人值守
. HTTP 根據URI自動路由
. 多運行環境支持
. 完整的 README.md 及客戶端調用示例
- 序言
- 入門指引
- 環境依賴
- 編譯安裝
- 編譯參數
- 常見錯誤
- Cygwin
- Linux二進制包
- 快速起步
- 創建TCP服務器
- 創建UDP服務器
- 創建Web服務器
- 創建WebSocket服務器
- 設置定時器
- 執行異步任務
- 創建同步TCP客戶端
- 創建異步TCP客戶端
- 網絡通信協議設計
- 使用異步客戶端
- 多進程共享數據
- 使用協程客戶端
- 協程:并發 shell_exec
- 協程:Go + Chan + Defer
- 協程:實現 Go 語言風格的 defer
- 協程:實現 sync.WaitGroup 功能
- 編程須知
- sleep/usleep的影響
- exit/die函數的影響
- while循環的影響
- stat緩存清理
- mt_rand隨機數
- 進程隔離
- 版本更新記錄
- 4.3.1
- 4.3.0 [大版本]
- 4.2.13
- 4.2.12
- 4.2.11
- 4.2.10
- 4.2.9
- 4.2.8
- 4.2.7
- 4.2.0
- 4.1.0
- 4.0.1
- 4.0.0
- 向下不兼容改動
- 新特性使用
- 4.3.0 在 Process 中使用協程
- 4.3.0 延時事件機制改進
- 2.1.2 進程池模塊的使用
- 1.9.24 調度支持 Stream 模式
- 1.9.24 異步客戶端自動解析域名
- 1.9.17 支持異步安全重啟特性
- 1.9.14 使用異步客戶端超時機制
- 1.8.0 使用內置Http異步客戶端
- 1.7.16 使用迭代器遍歷Server所有連接
- 1.7.5 在Server中使用swoole_table
- 1.7.5 swoole_client支持sendfile接口
- 1.7.4 SSL隧道加密TCP-Server
- 1.7.4 task進程中使用毫秒定時器
- 1.7.3 固定包頭+包體協議自動分包
- 1.7.3 onTask直接return取代finish函數
- 1.7.2 swoole_process多進程模塊的使用
- 1.7.2 task進程使用消息隊列
- 項目路線圖
- php.ini選項
- 內核參數調整
- 開發者列表
- 衍生開源項目
- 框架
- 工具
- 分布式
- 通信協議
- 用戶與案例
- 物聯網項目
- 網絡游戲
- 騰訊(Tencent)
- 百度(Baidu.com)
- 閱文集團
- BiliBili(嗶哩嗶哩)
- 車輪互聯(chelun.com)
- (撈月狗) 游戲社區
- 儒博(roobo.com)
- 提交錯誤報告
- 常見問題
- 升級swoole版本的常見問題
- 生成可分發的二進制swoole版本
- 在phpinfo中有在php -m中沒有
- Connection refused是怎么回事
- Resource temporarily unavailable [11]
- Cannot assign requested address [99]
- swoole與node.js相比有哪些優勢
- swoole與golang相比有哪些優勢
- pcre.h: No such file or directory
- undefined symbol: __sync_bool_compare_and_swap_4
- 學習Swoole需要掌握哪些基礎知識
- 同步阻塞與異步非阻塞適用場景
- PHP7環境下出現zend_mm_heap corrupted
- Swoole 項目起源和名字由來
- '__builtin_saddl_overflow' was not declared in this scope
- Server
- 函數列表
- Server::__construct
- Server->set
- Server->on
- Server->addListener
- Server->addProcess
- Server->listen
- Server->start
- Server->reload
- Server->stop
- Server->shutdown
- Server->tick
- Server->after
- Server->defer
- Server->clearTimer
- Server->close
- Server->send
- Server->sendfile
- Server->sendto
- Server->sendwait
- Server->sendMessage
- Server->exist
- Server->pause
- Server->resume
- Server->getClientInfo
- Server->getClientList
- Server->bind
- Server->stats
- Server->task
- Server->taskwait
- Server->taskWaitMulti
- Server->taskCo
- Server->finish
- Server->heartbeat
- Server->getLastError
- Server->getSocket
- Server->protect
- Server->confirm
- 屬性列表
- Server::$setting
- Server::$master_pid
- Server::$manager_pid
- Server::$worker_id
- Server::$worker_pid
- Server::$taskworker
- Server::$connections
- Server::$ports
- 配置選項
- reactor_num
- worker_num
- max_request
- max_conn (max_connection)
- task_worker_num
- task_ipc_mode
- task_max_request
- task_tmpdir
- dispatch_mode
- dispatch_func
- message_queue_key
- daemonize
- backlog
- log_file
- log_level
- heartbeat_check_interval
- heartbeat_idle_time
- open_eof_check
- open_eof_split
- package_eof
- open_length_check
- package_length_type
- package_length_func
- package_max_length
- open_cpu_affinity
- cpu_affinity_ignore
- open_tcp_nodelay
- tcp_defer_accept
- ssl_cert_file
- ssl_method
- ssl_ciphers
- user
- group
- chroot
- pid_file
- pipe_buffer_size
- buffer_output_size
- socket_buffer_size
- enable_unsafe_event
- discard_timeout_request
- enable_reuse_port
- enable_delay_receive
- open_http_protocol
- open_http2_protocol
- open_websocket_protocol
- open_mqtt_protocol
- open_websocket_close_frame
- reload_async
- tcp_fastopen
- request_slowlog_file
- enable_coroutine
- max_coroutine
- task_enable_coroutine
- ssl_verify_peer
- 監聽端口
- 可選參數
- 可選回調
- 連接迭代器
- 預定義常量
- 事件回調函數
- onStart
- onShutdown
- onWorkerStart
- onWorkerStop
- onWorkerExit
- onConnect
- onReceive
- onPacket
- onClose
- onBufferFull
- onBufferEmpty
- onTask
- onFinish
- onPipeMessage
- onWorkerError
- onManagerStart
- onManagerStop
- 高級特性
- 改變Worker進程的用戶/組
- 回調函數中的 reactor_id 和 fd
- Length_Check 和 EOF_Check 的使用
- Worker與Reactor通信模式
- TCP-Keepalive死連接檢測
- TCP服務器心跳維持方案
- 多端口監聽的使用
- 捕獲Server運行期致命錯誤
- Server內存管理機制
- Server的兩種運行模式介紹
- Server中對象的4層生命周期
- 在worker進程內監聽一個Server端口
- 在php-fpm/apache中使用task功能
- 常見問題
- 為什么不要send完后立即close
- 如何在回調函數中訪問外部的變量
- 是否可以共用1個redis或mysql連接
- 關于onConnect/onReceive/onClose順序
- 4種PHP回調函數風格
- 不同的Server程序實例間如何通信
- 錯誤信息:ERROR (9006)
- eventLoop has already been created. unable to create swoole_server
- 壓力測試
- 并發10萬TCP連接的測試
- PHP7+Swoole/Nginx/Golang性能對比
- 全球Web框架權威性能測試 Techempower Web Framework Benchmarks
- Coroutine
- Coroutine
- Coroutine::set
- Coroutine::stats
- Coroutine::create
- Coroutine::exist
- Coroutine::getCid
- Coroutine::getPcid
- Coroutine::getContext
- Coroutine::defer
- Coroutine::list
- Coroutine::getBackTrace
- Coroutine::yield
- Coroutine::resume
- Coroutine::fread
- Coroutine::fgets
- Coroutine::fwrite
- Coroutine::sleep
- Coroutine::gethostbyname
- Coroutine::getaddrinfo
- Coroutine::exec
- Coroutine::readFile
- Coroutine::writeFile
- Coroutine::statvfs
- Coroutine\Channel
- Coroutine\Channel->__construct
- Coroutine\Channel->push
- Coroutine\Channel->pop
- Coroutine\Channel->stats
- Coroutine\Channel->close
- Coroutine\Channel->length
- Coroutine\Channel->isEmpty
- Coroutine\Channel->isFull
- Coroutine\Channel->$capacity
- Coroutine\Channel->$errCode
- Coroutine\Client
- Coroutine\Client->connect
- Coroutine\Client->send
- Coroutine\Client->recv
- Coroutine\Client->close
- Coroutine\Client->peek
- Coroutine\Http\Client
- 屬性列表
- Coroutine\Http\Client->get
- Coroutine\Http\Client->post
- Coroutine\Http\Client->upgrade
- Coroutine\Http\Client->push
- Coroutine\Http\Client->recv
- Coroutine\Http\Client->addFile
- Coroutine\Http\Client->addData
- Coroutine\Http\Client->download
- Coroutine\Http2\Client
- Coroutine\Http2\Client->__construct
- Coroutine\Http2\Client->set
- Coroutine\Http2\Client->connect
- Coroutine\Http2\Client->send
- Coroutine\Http2\Client->write
- Coroutine\Http2\Client->recv
- Coroutine\Http2\Client->close
- Coroutine\Redis
- Coroutine\Redis::__construct
- Coroutine\Redis::setOptions
- 屬性列表
- 事務模式
- 訂閱模式
- Coroutine\Socket
- Coroutine\Socket::__construct
- Coroutine\Socket->bind
- Coroutine\Socket->listen
- Coroutine\Socket->accept
- Coroutine\Socket->connect
- Coroutine\Socket->send
- Coroutine\Socket->sendAll
- Coroutine\Socket->recv
- Coroutine\Socket->recvAll
- Coroutine\Socket->sendto
- Coroutine\Socket->recvfrom
- Coroutine\Socket->getsockname
- Coroutine\Socket->getpeername
- Coroutine\Socket->close
- Coroutine\MySQL
- 屬性列表
- Coroutine\MySQL->connect
- Coroutine\MySQL->query
- Coroutine\MySQL->prepare
- Coroutine\MySQL->escape
- Coroutine\MySQL->begin
- Coroutine\MySQL->commit
- Coroutine\MySQL->rollback
- Coroutine\MySQL\Statement->execute
- Coroutine\MySQL\Statement->fetch
- Coroutine\MySQL\Statement->fetchAll
- Coroutine\MySQL\Statement->nextResult
- Coroutine\PostgreSQL
- Coroutine\PostgreSQL->connect
- Coroutine\PostgreSQL->query
- Coroutine\PostgreSQL->fetchAll
- Coroutine\PostgreSQL->affectedRows
- Coroutine\PostgreSQL->numRows
- Coroutine\PostgreSQL->fetchObject
- Coroutine\PostgreSQL->fetchAssoc
- Coroutine\PostgreSQL->fetchArray
- Coroutine\PostgreSQL->fetchRow
- Coroutine\PostgreSQL->metaData
- Coroutine\PostgreSQL->prepare
- Server
- 并發調用
- setDefer 機制
- 子協程+通道
- 實現原理
- 協程與線程
- 發送數據協程調度
- 協程內存開銷
- 4.0 協程實現原理
- 協程客戶端超時規則
- 協程執行流程
- 常見問題
- 運行中出現 Fatal error: Maximum function nesting level of '1000' reached, aborting!
- 為什么只能在回調函數中使用協程客戶端
- 支持協程的回調方法列表
- 錯誤信息: XXXX client has already been bound to another coroutine
- Swoole4 協程與 PHP 的 Yield/Generator 協程有什么區別
- Swoole4 協程與 Go 協程有哪些區別
- 編程須知
- 在多個協程間共用同一個協程客戶端
- 禁止使用協程 API 的場景(2.x 版本)
- 使用類靜態變量/全局變量保存上下文
- 退出協程
- 異常處理
- 擴展組件
- MongoDB
- 編程調試
- Runtime
- 文件操作
- 睡眠函數
- 開關選項
- 嚴格模式
- Timer
- swoole_timer_tick
- swoole_timer_after
- swoole_timer_clear
- Memory
- Lock
- swoole_lock->__construct
- swoole_lock->lock
- swoole_lock->trylock
- swoole_lock->unlock
- swoole_lock->lock_read
- swoole_lock->trylock_read
- swoole_lock->lockwait
- Buffer
- swoole_buffer->__construct
- swoole_buffer->append
- swoole_buffer->substr
- swoole_buffer->clear
- swoole_buffer->expand
- swoole_buffer->write
- swoole_buffer->read
- swoole_buffer->recycle
- Table
- Table->__construct
- Table->column
- Table->create
- Table->set
- Table->incr
- Table->decr
- Table->get
- Table->exist
- Table->count
- Table->del
- Atomic
- swoole_atomic->__construct
- swoole_atomic->add
- swoole_atomic->sub
- swoole_atomic->get
- swoole_atomic->set
- swoole_atomic->cmpset
- swoole_atomic->wait
- swoole_atomic->wakeup
- mmap
- swoole_mmap::open
- Channel
- Channel->__construct
- Channel->push
- Channel->pop
- Channel->stats
- Serialize
- swoole_serialize::pack
- swoole_serialize::unpack
- Http\Server
- Http\Server
- Http\Server->on
- Http\Server->start
- Http\Request
- Http\Request->$header
- Http\Request->$server
- Http\Request->$get
- Http\Request->$post
- Http\Request->$cookie
- Http\Request->$files
- Http\Request->rawContent
- Http\Request->getData
- Http\Response
- Http\Response->header
- Http\Response->cookie
- Http\Response->status
- Http\Response->gzip
- Http\Response->redirect
- Http\Response->write
- Http\Response->sendfile
- Http\Response->end
- Http\Response->detach
- Http\Response::create
- 配置選項
- upload_tmp_dir
- http_parse_post
- document_root
- http_compression
- 常見問題
- CURL發送POST請求服務器端超時
- 使用Chrome訪問服務器會產生2次請求
- GET/POST請求的最大尺寸
- WebSocket\Server
- 回調函數
- onHandShake
- onOpen
- onMessage
- 函數列表
- WebSocket\Server->push
- WebSocket\Server->exist
- WebSocket\Server::pack
- WebSocket\Server::unpack
- WebSocket\Server->disconnect
- WebSocket\Server->isEstablished
- 預定義常量
- 常見問題
- 配置選項
- WebSocket\Frame
- Redis\Server
- 方法
- Redis\Server->setHandler
- Redis\Server::format
- 常量
- Process
- Process::__construct
- Process->start
- Process->name
- Process->exec
- Process->write
- Process->read
- Process->setTimeout
- Process->setBlocking
- Process->useQueue
- Process->statQueue
- Process->freeQueue
- Process->push
- Process->pop
- Process->close
- Process->exit
- Process::kill
- Process::wait
- Process::daemon
- Process::signal
- Process::alarm
- Process::setAffinity
- Process::exportSocket
- Process\Pool
- Process\Pool::__construct
- Process\Pool->on
- Process\Pool->listen
- Process\Pool->write
- Process\Pool->start
- Process\Pool->getProcess
- Client
- 方法列表
- swoole_client::__construct
- swoole_client->set
- swoole_client->on
- swoole_client->connect
- swoole_client->isConnected
- swoole_client->getSocket
- swoole_client->getSockName
- swoole_client->getPeerName
- swoole_client->getPeerCert
- swoole_client->send
- swoole_client->sendto
- swoole_client->sendfile
- swoole_client->recv
- swoole_client->close
- swoole_client->sleep
- swoole_client->wakeup
- swoole_client->enableSSL
- 回調函數
- onConnect
- onError
- onReceive
- onClose
- onBufferFull
- onBufferEmpty
- 屬性列表
- swoole_client->errCode
- swoole_client->sock
- swoole_client->reuse
- 并行
- swoole_client_select
- TCP客戶端異步連接
- SWOOLE_KEEP建立TCP長連接
- 常量
- 配置選項
- ssl_verify_peer
- ssl_host_name
- ssl_cafile
- ssl_capath
- package_length_func
- http_proxy_host
- 常見問題
- Event
- swoole_event_add
- swoole_event_set
- swoole_event_isset
- swoole_event_write
- swoole_event_del
- swoole_event_exit
- swoole_event_defer
- swoole_event_cycle
- swoole_event_wait
- swoole_event_dispatch
- 常見問題
- epoll_wait 偶爾會用很長時間
- 異步回調
- 異步文件系統IO
- swoole_async_readfile
- swoole_async_writefile
- swoole_async_read
- swoole_async_write
- swoole_async_dns_lookup
- swoole_async::exec
- 異步MySQL客戶端
- swoole_mysql->__construct
- swoole_mysql->on
- swoole_mysql->connect
- swoole_mysql->escape
- swoole_mysql->query
- swoole_mysql->begin
- swoole_mysql->commit
- swoole_mysql->rollback
- swoole_mysql->close
- 異步Redis客戶端
- swoole_redis->__construct
- swoole_redis->on
- swoole_redis->connect
- swoole_redis->__call
- swoole_redis->close
- 異步Http/WebSocket客戶端
- swoole_http_client->__construct
- swoole_http_client->set
- swoole_http_client->setMethod
- swoole_http_client->setHeaders
- swoole_http_client->setCookies
- swoole_http_client->setData
- swoole_http_client->addFile
- swoole_http_client->get
- swoole_http_client->post
- swoole_http_client->upgrade
- swoole_http_client->push
- swoole_http_client->execute
- swoole_http_client->download
- swoole_http_client->close
- 異步Http2.0客戶端
- swoole_http2_client->__construct
- swoole_http2_client->get
- swoole_http2_client->post
- swoole_http2_client->setHeaders
- swoole_http2_client->setCookies
- 高級
- Swoole的實現
- Reactor線程
- Manager進程
- Worker進程
- Reactor、Worker、TaskWorker的關系
- Task/Finish特性的用途
- 在php-fpm或apache中使用swoole
- Swoole異步與同步的選擇
- TCP/UDP壓測工具
- swoole服務器如何做到無人值守100%可用
- MySQL的連接池、異步、斷線重連
- PHP中哪些函數是同步阻塞的
- 守護進程程序常用數據結構
- 隊列(Queue)
- 堆(Heap)
- 定長數組(SplFixedArray)
- 使用jemalloc優化swoole內存分配性能
- C開發者如何使用Swoole
- C++開發者如何使用Swoole
- 使用systemd管理swoole服務
- 網卡中斷設置
- 將Swoole靜態編譯內嵌到PHP
- 異步回調程序內存管理
- 日志等級控制
- 使用 asan 內存檢測
- Windows編譯
- Swoole協程之旅-前篇
- Swoole協程之旅-中篇
- Swoole協程之旅-后篇
- 協程CPU密集場景調度實現
- 其他
- 函數列表
- swoole_set_process_name
- swoole_version
- swoole_strerror
- swoole_errno
- swoole_get_local_ip
- swoole_clear_dns_cache
- swoole_get_local_mac
- swoole_cpu_num
- swoole_last_error
- Swoole社區
- Swoole技術會議
- 工作組(Working Groups)
- 參與開源項目指引
- 捐贈Swoole項目
- 加入Swoole開發組
- 非協程特性獨立擴展 (swoole_async)
- 附錄:Linux信號列表
- 附錄:Linux錯誤碼(errno)列表
- 附錄:Swoole錯誤碼列表
- 附錄:TCP連接的狀態
- 附錄:tcpdump抓包工具的使用
- 附錄:strace工具的使用
- 附錄:gdb工具的使用
- 附錄:lsof工具的使用
- 附錄:perf工具的使用
- 附錄:編譯PHP擴展的相關工具
- 備用:已移除的歷史特性
- swoole_server->handler
- task_worker_max
- swoole_server->addtimer
- swoole_server->deltimer
- onTimer
- swoole_timer_add
- swoole_timer_del
- swoole_get_mysqli_sock
- swoole_mysql_query
- onMasterConnect
- onMasterClose
- Nginx/Golang/Swoole/Node.js的性能對比
- Coroutine::call_user_func
- Coroutine::call_user_func_array
- Coroutine\Channel::select
- task_async
- 歷史:版本更新記錄(1.x)
- 1.10.3
- 1.10.2
- 1.10.1
- 1.10.0
- 1.9.23
- 1.9.22
- 1.9.19
- 1.9.18
- 1.9.17
- 1.9.16
- 1.9.15
- 1.9.14
- 1.9.12
- 1.9.11
- 1.9.9
- 1.9.7
- 1.9.6
- 1.9.5
- 1.9.4
- 1.9.3
- 1.9.2
- 1.9.1
- 1.9.0
- 1.8.13
- 1.8.12
- 1.8.11
- 1.8.10
- 1.8.9
- 1.8.8
- 1.8.7
- 1.8.6
- 1.8.5
- 1.8.4
- 1.8.3
- 1.8.2
- 1.8.1
- 1.8.0
- 1.7.22
- 1.7.21
- 1.7.20
- 1.7.19
- 1.7.18
- 1.7.17
- 1.7.16
- 1.7.15
- 1.7.14
- 1.7.13
- 1.7.12
- 1.7.11
- 1.7.10
- 1.7.9
- 1.7.8
- 1.7.7
- 1.7.6
- 1.7.5
- v1.5
- v1.6
- v1.7
- 歷史:版本更新記錄(2.x)
- 2.0.1-Alpha
- 2.0.5
- 2.0.9
- 1.9.21
- 2.0.10
- 2.0.11
- 2.0.12
- 2.0.13
- 2.1.1
- 2.1.2
- 2.2.0
- 3.0.0
- 歷史:版本更新記錄(4.x)
- 4.0.3
- 4.0.2
- 4.0.4
- 4.1.1
- 4.1.2
- 4.2.1
- 4.2.2
- 4.2.3
- 4.2.4
- 4.2.5
- 4.2.6
- 4.2.7
- 4.2.9
- 4.2.8
- 社區文檔版權申明
- 社區文檔編輯條例