PHPackages                             clue/socket-react - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. clue/socket-react

ActiveLibrary[Queues &amp; Workers](/categories/queues)

clue/socket-react
=================

Binding for raw sockets (ext-sockets) in reactphp

v0.3.0(11y ago)211.5k↓91.7%8[3 issues](https://github.com/clue/php-socket-react/issues)[2 PRs](https://github.com/clue/php-socket-react/pulls)2MITPHPPHP &gt;=5.3

Since Apr 18Pushed 4y ago3 watchersCompare

[ Source](https://github.com/clue/php-socket-react)[ Packagist](https://packagist.org/packages/clue/socket-react)[ Docs](https://github.com/clue/php-socket-react)[ RSS](/packages/clue-socket-react/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (5)Dependencies (7)Versions (6)Used By (2)

clue/socket-react [![Build Status](https://camo.githubusercontent.com/68e60259c7d8f832043c56d9c3076b6e174e19d16f18c68d6e698f1382a50034/68747470733a2f2f7472617669732d63692e6f72672f636c75652f7068702d736f636b65742d72656163742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/clue/php-socket-react)
================================================================================================================================================================================================================================================================================================================

[](#cluesocket-react-)

Binding for raw sockets (ext-sockets) in React PHP.

Quickstart example
------------------

[](#quickstart-example)

Once [installed](#install), you can use the following example to send UDP broadcast datagrams:

```
$loop = React\EventLoop\Factory::create();

$factory = new Socket\React\Datagram\Factory($loop);

$promise = $factory->createClient('udp://localhost:1337', array('broadcast' => true));
$promise->then(function (Socket\React\Datagram\Socket $socket) {
    $socket->send('test');

    $socket->on('message', function($data, $peer) {
        var_dump('Received', $data, 'from', $peer);
    });
});

$loop->run();
```

See also the [examples](examples).

Install
-------

[](#install)

The recommended way to install this library is [through composer](http://getcomposer.org). [New to composer?](http://getcomposer.org/doc/00-intro.md)

```
{
    "require": {
        "clue/socket-react": "~0.3.0"
    }
}
```

Tests
-----

[](#tests)

To run the test suite, you need PHPUnit. Go to the project root and run:

```
$ phpunit tests

```

> Note: The test suite contains tests for ICMP sockets which require root access on unix/linux systems. Therefor some tests will be skipped unless you run `sudo phpunit tests` to execte the full test suite.

License
-------

[](#license)

MIT

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 99.2% 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 ~138 days

Total

5

Last Release

4266d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/776829?v=4)[Christian Lück](/maintainers/clue)[@clue](https://github.com/clue)

---

Top Contributors

[![clue](https://avatars.githubusercontent.com/u/776829?v=4)](https://github.com/clue "clue (121 commits)")[![cboden](https://avatars.githubusercontent.com/u/617694?v=4)](https://github.com/cboden "cboden (1 commits)")

---

Tags

asyncsocketsreactlow-levelext-sockets

### Embed Badge

![Health badge](/badges/clue-socket-react/health.svg)

```
[![Health](https://phpackages.com/badges/clue-socket-react/health.svg)](https://phpackages.com/packages/clue-socket-react)
```

###  Alternatives

[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k245.4M24.0k](/packages/friendsofphp-php-cs-fixer)[react/socket

Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP

1.3k129.1M440](/packages/react-socket)[league/geotools

Geo-related tools PHP 7.3+ library

1.4k5.5M30](/packages/league-geotools)[clue/docker-react

Async, event-driven access to the Docker Engine API, built on top of ReactPHP.

112160.9k1](/packages/clue-docker-react)[rector/rector-src

Instant Upgrade and Automated Refactoring of any PHP code

136400.8k14](/packages/rector-rector-src)[team-reflex/discord-php

An unofficial API to interact with the voice and text service Discord.

1.1k406.5k25](/packages/team-reflex-discord-php)

PHPackages © 2026

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