WebSocket Server

Documentation

Version Not Yet Released

You are viewing the documentation for the 1.x branch of the WebSocket Server package which has not yet been released. Be aware that the API for this version may change before release.

Installation & Setup

To install the package, run the following Composer command:

composer require babdev/websocket-server

Optional Dependencies

Some features require additional packages or PHP extensions, which are not installed by default:

FeatureRequirement
Dispatching connection events with the DispatchMessageToHandler middlewareA PSR-14 event dispatcher (psr/event-dispatcher and an implementation)
Resolving message handlers from a service container with the PsrContainerMessageHandlerResolverA PSR-11 container (psr/container and an implementation)
Logging failures the server cannot handleA PSR-3 logger (psr/log and an implementation)
Reading session data with the InitializeSession middlewareThe session PHP extension
Graceful shutdown on SIGTERM and SIGINT when using the Application classThe pcntl PHP extension, or an event loop with signal support