PHPackages                             waynesun01/swooletest - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. waynesun01/swooletest

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

waynesun01/swooletest
=====================

create swoole server

v1.0.1(9y ago)010mitPHPPHP &gt;=7.0

Since Apr 27Pushed 9y ago1 watchersCompare

[ Source](https://github.com/waynesun01/swoole_test)[ Packagist](https://packagist.org/packages/waynesun01/swooletest)[ RSS](/packages/waynesun01-swooletest/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

swoole\_test
============

[](#swoole_test)

完善中 方便快速创建基于swoole的服务

配置
--

[](#配置)

需要php.ini中开启swoole.use\_namespace，使用命名空间

用法
--

[](#用法)

- app中新建具体behavior类，该类根据要使用的service(tcp,http,websocket)继承自相应的behavior
- 在运行脚本中指定要使用的behavior

> 使用完整命名空间路径

- 初始化相应的service;
- 运行

example
-------

[](#example)

```
define('BASEDIR', __DIR__);
require 'autoload.php';//也可通过require引入行为类文件
require 'vendor/autoload.php';
$config = [
    'Host'=>'0.0.0.0',
    'Port'=>9501,
    'Behavior'=>'\app\imBehavior', //具体行为类
    'Set'=>[
        'worker_num'=>2, //onTask必须设置
        'task_worker_num'=>4,
    ]
];
//require 'app/imBehavior.php';//也可以自定义自动载入文件来加载具体行为类
$ws = new waynesun\swoole\wsService($config); //初始化服务
$ws->start();
```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~7 days

Total

2

Last Release

3345d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6cfccf880c30835ff5dffeb7ed46577820641971b208042699abfa84f82a7723?d=identicon)[waynesun011](/maintainers/waynesun011)

---

Top Contributors

[![waynesun01](https://avatars.githubusercontent.com/u/9527760?v=4)](https://github.com/waynesun01 "waynesun01 (23 commits)")

### Embed Badge

![Health badge](/badges/waynesun01-swooletest/health.svg)

```
[![Health](https://phpackages.com/badges/waynesun01-swooletest/health.svg)](https://phpackages.com/packages/waynesun01-swooletest)
```

###  Alternatives

[florianv/business

DateTime calculations in business hours

360781.1k1](/packages/florianv-business)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
