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(3mo ago)020PHPPHP ^8.1

Since Aug 20Pushed 3mo 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 today

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

38

—

LowBetter than 86% of packages

Maintenance78

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

118d 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

[mmerian/phpcrawl

PHPCrawl is a webcrawler/webspider-library written in PHP. It supports filters, limiters, cookie-handling, robots.txt-handling, multiprocessing and much more.

597.1k](/packages/mmerian-phpcrawl)[martin/forms-plugin

Create easy (and almost magic) AJAX forms

601.3k](/packages/martin-forms-plugin)

PHPackages © 2026

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