andrew-svirin/lumen-websocket

Websocket multi-channels in Lumen Laravel.

dev-develop 2020-07-15 11:13 UTC

This package is auto-updated.

Last update: 2020-07-15 11:13:22 UTC


README

Allows interaction server with multiple clients via websocket.

Installation

  1. Register service provider \AndrewSvirin\WebSocket\WebSocketServiceProvider
  2. Add custom service provider for events like this \AndrewSvirin\WebSocket\Tests\Data\Providers\EventServiceProvider
  3. Configure like tests/Data/config/websocket.php
  4. Add commands to console like here \AndrewSvirin\WebSocket\Tests\Data\Kernel

Testing

  1. Start test server /usr/bin/php artisan websocket:server-start --timeout=5 --uri=tcp://0.0.0.0:8000
  2. Run tests vendor/bin/phpunit
  3. Stop test server /usr/bin/php artisan websocket:server-stop