PHPackages                             hahadu/think-swoole-socket - 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. hahadu/think-swoole-socket

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

hahadu/think-swoole-socket
==========================

thinkphp swoole socket client&amp;server subscribe

v1.0.1(4y ago)013Apache-2.0PHP

Since Apr 26Pushed 4y ago1 watchersCompare

[ Source](https://github.com/hahadu/think-swoole-socket)[ Packagist](https://packagist.org/packages/hahadu/think-swoole-socket)[ RSS](/packages/hahadu-think-swoole-socket/feed)WikiDiscussions main Synced today

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

think-swoole-socket
===================

[](#think-swoole-socket)

thinkphp swoole socket client&amp;server subscribe

### install

[](#install)

```
composer require hahadu/think-swoole-socket

```

### main class

[](#main-class)

create class Swoole.php

```
namespace app;
use Hahadu\ThinkSwooleSocket\subscribe\Swooleable;
class Swoole extends Swooleable{
    public function onConnect($data){
       //$this->push($data);
       //or
       //$this->websocket->push(json_encode($data));
    }
}
```

### config

[](#config)

edit swoole.php for thinkphp config path

```
 [
 ...
  'websocket' => [
  ...
  'handler'       => Handler::class, //default
  ...
  'subscribe'     => [
            app\Swoole::class //because namespace app\Swoole
        ],
]
];
```

### run

[](#run)

console

```
php think swoole start

```

if you console show

```
Starting swoole http server...
Swoole http server started:
You can exit with `CTRL-C`

```

browser going

```
http://127.0.0.1:9502

```

### other

[](#other)

home page :

#### github

[](#github)

[hahadu/think-swoole-socket](https://github.com/hahadu/think-swoole-socket)

#### gitee:

[](#gitee)

[hahadu/think-swoole-socket](https://gitee.com/hahadu/think-swoole-socket)

#### browser javascript client:

[](#browser-javascript-client)

[tpswoole-websocket-jsclient](https://github.com/hahadu/tpswoole-websocket-jsclient)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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 ~23 days

Total

4

Last Release

1773d ago

Major Versions

v0.1.4 → v1.0.12021-07-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/8803f4b62a77e88a2b14f57d7d68a5bacaa69fd8c58b17101e89044fab8abb27?d=identicon)[hahadu](/maintainers/hahadu)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/hahadu-think-swoole-socket/health.svg)

```
[![Health](https://phpackages.com/badges/hahadu-think-swoole-socket/health.svg)](https://phpackages.com/packages/hahadu-think-swoole-socket)
```

###  Alternatives

[abr4xas/clarity-laravel

Easy integration of Microsoft Clarity into your Laravel application.

5661.8k](/packages/abr4xas-clarity-laravel)[flarum/extension-manager

An extension manager to install, update and remove extension packages from the interface (Wrapper around composer).

12211.5k](/packages/flarum-extension-manager)

PHPackages © 2026

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