Download the PHP package fastd/swoole without Composer
On this page you can find all versions of the php package fastd/swoole. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Vendor fastd
Package swoole
Short Description Swoole HTTP server, coroutine, IPC and client component for FastD, requiring Swoole >= 6.0.
License MIT
Package swoole
Short Description Swoole HTTP server, coroutine, IPC and client component for FastD, requiring Swoole >= 6.0.
License MIT
Please rate this library. Is it a good library?
Informations about the package swoole
FastD Swoole
高性能网络服务组件. 提供底层服务封装, 基础管理及客户端调用功能. 使用 composer 进行管理, 可在此基础上进行封装整合.
环境要求
- Linux (不考虑windows)
- swoole >= 6.0
- PHP >= 8.4.1
注意:代码使用了 PHP 8.4 的特性(如 readonly 属性)和 Swoole 6.0+ 的 API,确保你的环境满足这些要求。
版本兼容性
- PHP >= 8.4.1 推荐使用最新版本
- 最低要求 Swoole 6.0,推荐使用最新稳定版
源码地址: swoole
pecl 安装
安装
并发编排
FastD\Swoole\Concurrency\Parallel 提供运行时自适应的并发执行器:
- Swoole 协程上下文:并发执行
- CGI / 非协程上下文:自动串行执行
- 调用方代码无需判断运行环境
- 支持整体超时
- 保留输入键名与顺序
典型场景:/dashboard 并发聚合多个上游接口,避免串行等待。任务应为 I/O 型,避免在任务间共享可变状态;超时会取消剩余协程。
文档
中文文档
使用
FastD Swoole 采用事件驱动架构,使用事件监听器来处理各种服务器事件。以下是使用示例:
HTTP 服务器
TCP 服务器
WebSocket 服务器
多端口支持
服务管理
Process
Multi Process
IPC (Inter-Process Communication)
FastD Swoole 提供了三种 IPC 实现,用于进程间通信:
- Memory: 基于 Swoole\Table 的共享内存实现
- Queue: 基于 Swoole\Process\useQueue 的消息队列实现
- Socket: 基于 Swoole\Coroutine\Socket 的套接字实现
IPC 使用示例
与 Worker 集成
贡献
非常欢迎感兴趣,愿意参与其中,共同打造更好PHP生态,Swoole生态的开发者。
如果你乐于此,却又不知如何开始,可以试试下面这些事情:
- 在你的系统中使用,将遇到的问题 反馈。
- 有更好的建议?欢迎联系 新浪微博:编码侠。
联系
如果你在使用中遇到问题,请联系: 编码侠
License MIT
All versions of swoole with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.4.1
ext-posix Version *
ext-sockets Version *
ext-swoole Version >=6.0
fastd/http Version ^8.1
fastd/event Version ^8.0
ext-posix Version *
ext-sockets Version *
ext-swoole Version >=6.0
fastd/http Version ^8.1
fastd/event Version ^8.0
The package fastd/swoole contains the following files
Loading the files please wait ...