PHPackages                             phalanx/websocket - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. phalanx/websocket

ActiveLibrary[HTTP &amp; Networking](/categories/http)

phalanx/websocket
=================

WebSocket support for Phalanx async coordination library

v0.2.0(1mo ago)00MITPHPPHP ^8.4

Since Mar 23Pushed 1mo agoCompare

[ Source](https://github.com/havy-tech/phalanx-websocket)[ Packagist](https://packagist.org/packages/phalanx/websocket)[ Docs](https://github.com/havy-tech/phalanx-websocket)[ RSS](/packages/phalanx-websocket/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (3)Used By (0)

 [![Phalanx](brand/logo.svg)](brand/logo.svg)

phalanx/websocket
=================

[](#phalanxwebsocket)

Production-grade WebSocket support with RFC 6455 handshake, topic-based pub/sub, and leak-free connection tracking via `WeakMap`. Integrates directly with the Phalanx HTTP runner -- WebSocket and HTTP traffic share a single port.

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Quick Start](#quick-start)
- [Connections](#connections)
- [Messages](#messages)
- [Routes](#routes)
- [Gateway Pub/Sub](#gateway-pubsub)
- [Connection Lifecycle](#connection-lifecycle)
- [Route Parameters](#route-parameters)
- [Integration with phalanx/http](#integration-with-phalanxhttp)

Installation
------------

[](#installation)

```
composer require phalanx/websocket
```

Requires PHP 8.4+, `phalanx/core`, `phalanx/stream`, `ratchet/rfc6455`, and `react/stream`.

Quick Start
-----------

[](#quick-start)

```
