Conveyor

Socket Conveyor routes WebSocket messages in PHP with OpenSwoole.


What it provides

Socket Conveyor gives you:

  • A long-running OpenSwoole WebSocket server.
  • A native JSON action protocol for direct WebSocket clients.
  • A Pusher/Reverb-compatible protocol for Laravel Echo and pusher-js.
  • Channel membership, private/presence authorization, server-side broadcasts, acknowledgments, and custom action handlers.

Protocol modes

Native Conveyor mode uses the socketconveyor.com WebSocket subprotocol:

1Constants::WEBSOCKET_SUBPROTOCOL => Constants::SOCKET_CONVEYOR

Pusher/Reverb-compatible mode uses the pusher.com WebSocket subprotocol:

1Constants::WEBSOCKET_SUBPROTOCOL => Constants::PUSHER

You choose one mode per server instance.

When to use native mode

Use native mode when you control the WebSocket client and want simple JSON actions:

  • base-action
  • channel-connect
  • broadcast-action
  • fanout-action
  • channel-disconnect
  • acknowledge-action

Native mode is also the path for custom Conveyor actions and middleware.

When to use Pusher/Reverb mode

Use Pusher/Reverb mode when a Laravel app should broadcast normally through its built-in reverb or pusher connection. Conveyor behaves as the compatible WebSocket and REST broadcast server, while Laravel keeps owning /broadcasting/auth and routes/channels.php.

See the dedicated Pusher Protocol page for server configuration and connection details.

For normal Laravel Echo usage, you should not need a custom Conveyor Laravel broadcaster package.