PHPackages                             sheld/swoole-websocket-router - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. sheld/swoole-websocket-router

ActiveLibrary[HTTP &amp; Networking](/categories/http)

sheld/swoole-websocket-router
=============================

a router for swooler websocket server

v0.0.1(8y ago)011MITPHP

Since Sep 5Pushed 8y ago1 watchersCompare

[ Source](https://github.com/mcwz/swoole-websocket-router)[ Packagist](https://packagist.org/packages/sheld/swoole-websocket-router)[ RSS](/packages/sheld-swoole-websocket-router/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

简介
==

[](#简介)

这是一个基于 swoole 框架完成 websocket 路由的库。通过识别 websocket 信息中的指定字符串去调取相应的控制器类完成相应动作。

目前状态
====

[](#目前状态)

刚刚形成基本框框，有待进一步完善。

用法
==

[](#用法)

1. server.php 是入口文件，执行 php server.php 启动 websocket 服务器。
2. controllers 是控制器文件存放位置，写成类形式。
3. 客户端发送的消息默认应遵循 {"r":"controllerDirectory/controllerClass/method","m":"message"} ，信息会路由进相应的类中。
4. 可以在 config.php 里修改绑定的 IP 和端口。

其它
==

[](#其它)

另在 index.html 中封装了一段简单处理 websocket 的代码，后续会继续完善这个封装，如果最后可能的话，会独立一个这个项目。

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

Unknown

Total

1

Last Release

3169d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/46c0ffbe39c66f21c5a97fc03710bf10b9a933247836a9008a91fe2b299a1a57?d=identicon)[sheld](/maintainers/sheld)

---

Top Contributors

[![kissgxd](https://avatars.githubusercontent.com/u/1843050?v=4)](https://github.com/kissgxd "kissgxd (5 commits)")

### Embed Badge

![Health badge](/badges/sheld-swoole-websocket-router/health.svg)

```
[![Health](https://phpackages.com/badges/sheld-swoole-websocket-router/health.svg)](https://phpackages.com/packages/sheld-swoole-websocket-router)
```

###  Alternatives

[mateusjunges/laravel-kafka

A kafka driver for laravel

7163.1M17](/packages/mateusjunges-laravel-kafka)[workerman/webman

High performance HTTP Service Framework.

2.6k86.6k68](/packages/workerman-webman)[akamai-open/edgegrid-client

Implements the Akamai {OPEN} EdgeGrid Authentication specified by https://developer.akamai.com/introduction/Client\_Auth.html

482.5M6](/packages/akamai-open-edgegrid-client)[onlime/laravel-http-client-global-logger

A global logger for the Laravel HTTP Client

1935.1k](/packages/onlime-laravel-http-client-global-logger)[huaweicloud/huaweicloud-sdk-php

Huawei Cloud SDK for PHP

1829.2k2](/packages/huaweicloud-huaweicloud-sdk-php)[opiy-org/asterisk-ari-php

An object-oriented client for the Asterisk REST Interface (ARI). Handles ARI calls and events for you.

121.1k](/packages/opiy-org-asterisk-ari-php)

PHPackages © 2026

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