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

Parse WAMP Message Middleware

The BabDev\WebSocket\Server\WAMP\Middleware\ParseWAMPMessage class is a server middleware which parses an incoming WAMP message to be consumed by a message handler.

The middleware also allows enabling a keepalive ping-pong for the server.

Customizing The Server Identity

Per the WAMP version 1 specification, a server may identify itself with the serverIdent parameter in its response to the WELCOME message. By default, the middleware uses the BabDev\WebSocket\Server\Server::VERSION constant as its identity, but this can be customized by updating the server identity for the middleware instance.

<?php declare(strict_types=1);

use BabDev\WebSocket\Server\WAMP\Middleware\ParseWAMPMessage;

$middleware = new ParseWAMPMessage($decoratedMiddleware, $topicRegistry);
$middleware->setServerIdentity(''); // An empty string is allowed to not disclose any identity
$middleware->setServerIdentity('My-Awesome-Application/1.0');

Position in Middleware Stack

It is recommended that this middleware is decorated by the BabDev\WebSocket\Server\WebSocket\Middleware\EstablishWebSocketConnection 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 placed anywhere after the HTTP request has been parsed and does not expect one of the server middleware sub-interfaces.

It is also recommended that this middleware decorates the use BabDev\WebSocket\Server\WAMP\Middleware\UpdateTopicSubscriptions middleware, but it can decorate any WAMP server 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.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package