PHPackages                             woodylan/go-websocket-php-sdk - 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. woodylan/go-websocket-php-sdk

ActiveLibrary

woodylan/go-websocket-php-sdk
=============================

WebSocket微服务PHP SDK

v1.0.0(6y ago)53.0k↓50%2MITPHPPHP &gt;=7

Since Mar 15Pushed 6y agoCompare

[ Source](https://github.com/woodylan/go-websocket-php-sdk)[ Packagist](https://packagist.org/packages/woodylan/go-websocket-php-sdk)[ RSS](/packages/woodylan-go-websocket-php-sdk/feed)WikiDiscussions master Synced 1mo ago

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

go-websocket 项目的PHP版SDK
=======================

[](#go-websocket-项目的php版sdk)

go-websocket 项目地址：

安装
--

[](#安装)

Composer

```
composer require woodylan/go-websocket-php-sdk
```

使用
--

[](#使用)

```
// 导入类
use Woodylan\Websocket\WsServer;
// 实例化
$wsServer = new WsServer('https://ws.example.com', '660');
// 例子 注册系统
$wsServer->register('xxxxx');
```

接口列表
----

[](#接口列表)

1. 注册系统

    ```
    $wsServer->register($systemId);
    ```
2. 发送给指定clientId

    ```
    $wsServer->sendToClientId($systemId, $clientId, $sendUserId, $code, $msg, $data);
    ```
3. 发送给指定clientIds

    ```
    $wsServer->sendToClientIds($systemId, $clientIds, $sendUserId, $code, $msg, $data);
    ```
4. 绑定clientId到分组

    ```
    $wsServer->bindToGroup($systemId, $groupName, $clientId, $userId = '');
    ```
5. 发送消息给指定分组

    ```
    $wsServer->sendToGroup($systemId, $groupName, $sendUserId, $code, $msg, $data);
    ```
6. 获取在线客户端列表

    ```
    $wsServer->getOnlineList($systemId, $groupName = '');
    ```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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

2250d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fafa4047b0c1449c1fc5050d79f75ff247d2b53a4d9a2e645aa07825bdebc3c2?d=identicon)[woodylan](/maintainers/woodylan)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/woodylan-go-websocket-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/woodylan-go-websocket-php-sdk/health.svg)](https://phpackages.com/packages/woodylan-go-websocket-php-sdk)
```

PHPackages © 2026

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