Weave Code
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 HTTP Request Middleware

The BabDev\WebSocket\Server\Http\Middleware\ParseHttpRequest class is a server middleware which is used to read the initial HTTP request to the server and transforms it into a PSR-7 Psr\Http\Message\RequestInterface object which is stored on the connection's attribute store.

Request Parsing

The middleware requires a BabDev\WebSocket\Server\Http\RequestParser to transform the raw HTTP request body into a Psr\Http\Message\RequestInterface object. Parsers support chunked messages as read by the middleware and should check the http.buffer key on the connection's attribute store to decide if the full body has been received.

By default, the middleware will use the BabDev\WebSocket\Server\Http\GuzzleRequestParser class which relies on the guzzlehttp/psr7 package. You can use your own parser by implementing the interface and passing your class as the second parameter to the middleware's constructor.

Position in Middleware Stack

It is recommended that this middleware is decorated by the BabDev\WebSocket\Server\Http\Middleware\RejectBlockedIpAddress middleware in your application (see the message flow section from the architecture documentation to see the recommended stack with all optional middleware). As most middleware require the HTTP request to function, this should be one of the first middleware in your stack.

It is also recommended that this middleware decorates the BabDev\WebSocket\Server\WebSocket\Middleware\EstablishWebSocketConnection middleware, but it can decorate any 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.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor