PHPackages                             ngatngay/swoole-socket.io - 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. ngatngay/swoole-socket.io

ActiveLibrary[HTTP &amp; Networking](/categories/http)

ngatngay/swoole-socket.io
=========================

:rainbow: Socket.io Server implementation for Swoole

04PHP

Since Nov 3Pushed 1y agoCompare

[ Source](https://github.com/ngatngay/swoole-socket.io)[ Packagist](https://packagist.org/packages/ngatngay/swoole-socket.io)[ RSS](/packages/ngatngay-swoole-socketio/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

socket.io-swoole-server
=======================

[](#socketio-swoole-server)

🌈 Socket.io Server implementation for Swoole

[![Build Status](https://camo.githubusercontent.com/46b7515aa1f2d15287efe7529df4c3d25e2214eb794d58044988481337dd5bc1/68747470733a2f2f7472617669732d63692e6f72672f73687569786e2f736f636b65742e696f2d73776f6f6c652d7365727665722e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/46b7515aa1f2d15287efe7529df4c3d25e2214eb794d58044988481337dd5bc1/68747470733a2f2f7472617669732d63692e6f72672f73687569786e2f736f636b65742e696f2d73776f6f6c652d7365727665722e7376673f6272616e63683d6d6173746572)[![](https://camo.githubusercontent.com/19d404ea610f2e88afbef8fba77cc06d9d6a40b1cf9fc6cbde4fbf39c3e276ec/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344372e312e302d677265656e)](https://camo.githubusercontent.com/19d404ea610f2e88afbef8fba77cc06d9d6a40b1cf9fc6cbde4fbf39c3e276ec/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344372e312e302d677265656e)[![](https://camo.githubusercontent.com/9847ecf08648d2ac793dc08c6816cf14e164cfeb3f42a34c6c4b3640cfc7c6f4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53776f6f6c652d253345253344342e302e332d677265656e)](https://camo.githubusercontent.com/9847ecf08648d2ac793dc08c6816cf14e164cfeb3f42a34c6c4b3640cfc7c6f4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53776f6f6c652d253345253344342e302e332d677265656e)[![](https://camo.githubusercontent.com/5ba09ddaceb1e386e89ac1c166036a9855899288e628a24a041664217d5ff6e3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f73687569786e2f736f636b65742e696f2d73776f6f6c652d736572766572)](https://camo.githubusercontent.com/5ba09ddaceb1e386e89ac1c166036a9855899288e628a24a041664217d5ff6e3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f73687569786e2f736f636b65742e696f2d73776f6f6c652d736572766572)

Code Contributors
-----------------

[](#code-contributors)

Thank you.\[[Contribute](https://github.com/shuixn/socket.io-swoole-server/graphs/contributors)\].

Server
------

[](#server)

### Server Config

[](#server-config)

```
$config = new SocketIO\Engine\Server\ConfigPayload();
$config
    // server worker_num
    ->setWorkerNum(2)
    // server daemonize
    ->setDaemonize(0);
```

### Examples

[](#examples)

```
$io = new SocketIO\Server(9501, $config, function(SocketIO\Server $io) {
    $io->on('connection', function (SocketIO\Server $socket) {
        $socket->on('new message', function (SocketIO\Server $socket) {
            $socket->broadcast('new message', $socket->getMessage());
        });

        $socket->on('new user', function (SocketIO\Server $socket) {
            $socket->broadcast('login', $socket->getMessage());
        });

        $socket->on('disconnect', function (SocketIO\Server $socket) {
            $socket->broadcast('user left', $socket->getMessage());
        });
    });
});

$io->start();
```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 Bus Factor1

Top contributor holds 80.5% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/fb2ec1942d6ef9b641179494e9efc848ca268fd0f38cb5c03a441c1bb7d54ac3?d=identicon)[pmtpro](/maintainers/pmtpro)

---

Top Contributors

[![shuixn](https://avatars.githubusercontent.com/u/7775361?v=4)](https://github.com/shuixn "shuixn (33 commits)")[![ipejasinovic](https://avatars.githubusercontent.com/u/10921037?v=4)](https://github.com/ipejasinovic "ipejasinovic (6 commits)")[![pmtpro](https://avatars.githubusercontent.com/u/25657732?v=4)](https://github.com/pmtpro "pmtpro (1 commits)")[![slotkeonline](https://avatars.githubusercontent.com/u/66825894?v=4)](https://github.com/slotkeonline "slotkeonline (1 commits)")

### Embed Badge

![Health badge](/badges/ngatngay-swoole-socketio/health.svg)

```
[![Health](https://phpackages.com/badges/ngatngay-swoole-socketio/health.svg)](https://phpackages.com/packages/ngatngay-swoole-socketio)
```

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M316](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M292](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

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