PHPackages                             morozovsk/yii2-websocket - 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. morozovsk/yii2-websocket

ActiveYii2-extension[HTTP &amp; Networking](/categories/http)

morozovsk/yii2-websocket
========================

simple php websocket server with examples and demo: simple chat (single daemon) - http://sharoid.ru/chat.html , pro chat (master + worker) - http://sharoid.ru/chat2.html , simple game - http://sharoid.ru/game.html

1.0.1(9y ago)9414.8k13[1 issues](https://github.com/morozovsk/yii2-websocket/issues)MITPHP

Since Sep 5Pushed 9y ago17 watchersCompare

[ Source](https://github.com/morozovsk/yii2-websocket)[ Packagist](https://packagist.org/packages/morozovsk/yii2-websocket)[ Docs](http://sharoid.ru/game.html)[ RSS](/packages/morozovsk-yii2-websocket/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

Websocket extension for simple websocket server on php .

"composer require morozovsk/yii2-websocket"

Configuration:

In order to enable this command you should adjust the configuration of your console application:

return \[ // ...

```
'components' => [
    'websocket' => [
        'class' => 'morozovsk\yii2websocket\Connection',
        'servers' => [
            'chat3' => [
                'class' => 'morozovsk\websocket\examples\chat3\Chat3WebsocketDaemonHandler',
                'pid' => '/tmp/websocket_chat.pid',
                'websocket' => 'tcp://127.0.0.1:8004',
                'localsocket' => 'tcp://127.0.0.1:8010',
                //'master' => 'tcp://127.0.0.1:8020',
                //'eventDriver' => 'event'
            ]
        ],
    ],
],

// ...
'controllerMap' => [
    'websocket' => 'morozovsk\yii2websocket\console\controllers\WebsocketController'
],

```

\];

Run from console:

- start: "./yii websocket/start chat3" or "nohup ./yii websocket/start chat3 &amp;"
- stop: "./yii websocket/stop"
- restart: "./yii websocket/restart chat3" or "nohup ./yii websocket/restart chat3 &amp;"

\###License

(The MIT License)

Copyright (c) 2015 Vladimir Goncharov

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity40

Moderate usage in the ecosystem

Community15

Small or concentrated contributor base

Maturity64

Established project with proven stability

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

Total

2

Last Release

3627d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5ea6433027f1bd3fd09910b81856e14edcb36493f8f6b176349be1578bc81447?d=identicon)[morozovsk](/maintainers/morozovsk)

---

Top Contributors

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

---

Tags

eventlaravelserverwebsocketyiichatgamedemolibeventexamlesocket\_select

### Embed Badge

![Health badge](/badges/morozovsk-yii2-websocket/health.svg)

```
[![Health](https://phpackages.com/badges/morozovsk-yii2-websocket/health.svg)](https://phpackages.com/packages/morozovsk-yii2-websocket)
```

###  Alternatives

[morozovsk/websocket

simple php websocket server with examples and demo: simple chat (single daemon) - http://sharoid.ru/chat.html , pro chat (master + worker) - http://sharoid.ru/chat2.html , simple game - http://sharoid.ru/game.html

36417.3k2](/packages/morozovsk-websocket)[morozovsk/websocket-examples

examples for simple php websocket server: simple chat (single daemon) - http://sharoid.ru/chat.html , pro chat (master + worker) - http://sharoid.ru/chat2.html , simple game - http://sharoid.ru/game.html

382.3k](/packages/morozovsk-websocket-examples)[hhxsv5/laravel-s

🚀 LaravelS is an out-of-the-box adapter between Laravel/Lumen and Swoole.

3.9k676.0k10](/packages/hhxsv5-laravel-s)[swow/swow

Coroutine-based multi-platform support engine with a focus on concurrent I/O

1.3k2.1M84](/packages/swow-swow)[basement-chat/basement-chat

Add a real-time chat widget to your Laravel application.

4983.9k](/packages/basement-chat-basement-chat)[joni-jones/yii2-wschat

Online chat based on web sockets and ratchet php

981.3k](/packages/joni-jones-yii2-wschat)

PHPackages © 2026

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