Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Websocket Server Laravel Package

babdev/websocket-server

View on GitHub
Deep Wiki
Context7

Dispatch Message To Handler Middleware

The BabDev\WebSocket\Server\WAMP\Middleware\DispatchMessageToHandler class is a server middleware which is responsible for routing the WAMP message to its message handler.

This middleware also supports emitting events using a PSR-14 compatible event dispatcher when a connection is opened, closed, or an error occurs.

This middleware requires the Symfony's Routing component to serve as the websocket server's router.

Please see the Symfony documentation for more information on how to use their API.

Available Events

  • BabDev\WebSocket\Server\Connection\Event\ConnectionClosed - dispatched when a client has closed their connection
  • BabDev\WebSocket\Server\Connection\Event\ConnectionError - dispatched when there is a client error or an unhandled exception on the server
  • BabDev\WebSocket\Server\Connection\Event\ConnectionOpened - dispatched when a new client has connected to the server

Position in Middleware Stack

It is recommended that this middleware is decorated by the BabDev\WebSocket\Server\WebSocket\Middleware\UpdateTopicSubscriptions middleware in your application (see the message flow section from the architecture documentation to see the recommended stack with all optional middleware), however it can be decorated by any WAMP server middleware.

This middleware is intended to be the innermost middleware in your application, and as such, does not support decorating other middleware.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator