kanata-php / socket-conveyor
A WebSocket/Socket message Router
Fund package maintenance!
Requires
- php: ^8.2
- ext-openswoole: ^22.0|^22.1
- league/pipeline: ^1.0
- lotharthesavior/hook: ^0.0.1
- symfony/event-dispatcher: ^7.0
- symfony/workflow: ^7.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.41
- kanata-php/conveyor-server-client: ^0.1.0
- mockery/mockery: ^1.4
- openswoole/core: ^22.1
- openswoole/ide-helper: ^22.0
- phpro/grumphp: ^2.3
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^9.2
- squizlabs/php_codesniffer: ^3.7
- symfony/var-dumper: ^6.1
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-master
- 3.0.1-beta
- 3.0.0-beta
- 2.6.1
- 2.6.0
- 2.5.1
- 2.5.0
- 2.4.4
- 2.4.3
- 2.4.2
- 2.4.1
- 2.4.0
- 2.3.2
- 2.3.1
- 2.3.0
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.9
- 2.0.8
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.0
- 1.4.0
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.1
- 1.2.0
- 1.1.9
- 1.1.8
- 1.1.7
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.2.5
- 0.2.4
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- 0.0.1
- dev-chore/ecosystem-refresh-20261107
This package is auto-updated.
Last update: 2026-11-08 03:53:23 UTC
README
Documentation · Install · Quick start · Usage guide
socket-conveyor-v2.6.1.mp4
A PHP WebSocket server and message router built on OpenSwoole. Use its native action-based protocol for custom applications, or run its Pusher-compatible mode with Laravel Echo and Laravel's Reverb or Pusher broadcaster.
Laravel Echo guide · Docker Hub
What it does
- Routes native WebSocket messages to built-in or custom action handlers.
- Supports Pusher-compatible public, private and presence channels for Laravel Echo clients.
- Provides signed HTTP endpoints for publishing events and querying channels.
- Offers configurable resource limits and application isolation for Pusher deployments.
- Runs as a PHP library or as a standalone Docker server.
Requirements
For the PHP library, you need PHP 8.2 or newer, Composer, and the OpenSwoole extension (version 22.0 or newer). The Docker image includes PHP and OpenSwoole. Development with the renamed PHP client requires PHP 8.3+ and OpenSwoole 26.2+; the server library keeps its PHP 8.2 runtime minimum.
composer require firebrikdotcom/socket-conveyor
The firebrikdotcom/* Composer namespace is being prepared. Until it is registered on Packagist and a release is published, existing installations continue to use kanata-php/socket-conveyor. The Docker image below remains available under its existing name.
See the usage guide for a native server, protocol examples and configuration.
Quick start with Docker
Export your existing PUSHER_APP_ID, PUSHER_APP_KEY and PUSHER_APP_SECRET in your shell, then run:
docker run --rm --init -p 127.0.0.1:8080:8080 \ -e PUSHER_APP_ID -e PUSHER_APP_KEY -e PUSHER_APP_SECRET \ lotharthesavior/socket-conveyor:2.6.1
The image runs a Pusher-compatible server. Match its credentials to your Laravel broadcasting configuration. The port above binds to localhost; use a properly configured reverse proxy and TLS for public access. See the Docker guide for image tags, configuration and deployment details.
Laravel Echo and Pusher compatibility
To configure a server from PHP instead of using the Docker launcher:
use Conveyor\Constants; use Conveyor\ConveyorServer; (new ConveyorServer()) ->port(8080) ->conveyorOptions([ Constants::WEBSOCKET_SUBPROTOCOL => Constants::PUSHER, Constants::USE_PRESENCE => true, Constants::APPS => [[ 'app_id' => 'local', 'key' => env('REVERB_APP_KEY'), 'secret' => env('REVERB_APP_SECRET'), 'enable_client_messages' => true, 'enabled' => true, ]], ]) ->start();
Set Laravel's Reverb or Pusher settings to the same application ID, key, secret, host and port. The server accepts WebSocket connections at /app/{key} and signed HTTP requests under /apps/{app_id}. Follow the Laravel Echo guide for a complete client and authorization setup.
Security and operations
Pusher mode validates inputs, isolates applications and applies configurable resource budgets; review Pusher security and limits before deployment. The Docker health check reports TCP liveness; the smoke test checks actual event delivery.
More resources
- Full usage guide, including native mode and troubleshooting
- Real Pusher client example, using Laravel Echo and
pusher-js - Changelog
- MIT license