PHPackages                             ali-eltaweel/socket-worker - 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. ali-eltaweel/socket-worker

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

ali-eltaweel/socket-worker
==========================

Socket Worker

1.3.1(5mo ago)020PHPPHP ^8.1

Since Aug 20Pushed 5mo agoCompare

[ Source](https://github.com/ali-eltaweel/socket-worker)[ Packagist](https://packagist.org/packages/ali-eltaweel/socket-worker)[ RSS](/packages/ali-eltaweel-socket-worker/feed)WikiDiscussions master Synced 1mo ago

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

Socket Worker
=============

[](#socket-worker)

**Socket Worker**

Installation
------------

[](#installation)

```
composer require ali-eltaweel/socket-worker
```

Basic Usage
-----------

[](#basic-usage)

### Worker

[](#worker)

```
$worker = new SocketWorker\SocketWorker(
    socketPath:     'path/to/socket/file',
    statusFilePath: 'path/to/socket/status/file',
    commandsCodec:   new class implements Codecs\ICodec { /**/ },
    commandHandler:  function(SocketWorker\Commands\SocketCommand $command): SocketWorker\Commands\SocketResponse {

        // ...

        return new SocketWorker\Commands\SocketResponse(status: true, data: []);
    }
);

while ($worker->status === SocketWorker\SocketWorkerStatus::Ready) {

    $worker->accept();
}
```

### Dispatcher

[](#dispatcher)

```
$worker = new SocketWorker\SocketWorkerInterface(
    socketPath:     'path/to/socket/file',
    statusFilePath: 'path/to/socket/status/file',
    commandsCodec:   new class implements Codecs\ICodec { /**/ }
);

/**
 * @var SocketWorker\Commands\SocketResponse $response
 */
$response = $worker->execute(new SocketWorker\Commands\SocketCommand('cmd', arguments: []));
```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance70

Regular maintenance activity

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

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

Total

5

Last Release

170d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7564e10ba11b25d8700726a92f669e38be2ff9191e8f6ccdfafc36678ffab2b8?d=identicon)[ali-eltaweel](/maintainers/ali-eltaweel)

---

Top Contributors

[![ali-eltaweel](https://avatars.githubusercontent.com/u/45892756?v=4)](https://github.com/ali-eltaweel "ali-eltaweel (6 commits)")

### Embed Badge

![Health badge](/badges/ali-eltaweel-socket-worker/health.svg)

```
[![Health](https://phpackages.com/badges/ali-eltaweel-socket-worker/health.svg)](https://phpackages.com/packages/ali-eltaweel-socket-worker)
```

###  Alternatives

[dklemmt/contao_dk_mmenu

Implementation of mmenu as an extension for the Contao Open Source CMS.

1578.7k](/packages/dklemmt-contao-dk-mmenu)[abhi1693/yii2-config

Yii2 manage configuration from database

1311.0k1](/packages/abhi1693-yii2-config)

PHPackages © 2026

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