PHPackages                             highperapp/websockets - 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. highperapp/websockets

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

highperapp/websockets
=====================

High-performance WebSocket server with O(1) indexed broadcasting. Fully compatible with PHP 8.3 &amp; 8.4 for modern async applications.

10(10mo ago)081MITPHPPHP ^8.3|^8.4

Since Jul 5Pushed 7mo agoCompare

[ Source](https://github.com/highperapp/websockets)[ Packagist](https://packagist.org/packages/highperapp/websockets)[ RSS](/packages/highperapp-websockets/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (7)Versions (5)Used By (1)

HighPer WebSockets
==================

[](#highper-websockets)

[![PHP Version](https://camo.githubusercontent.com/997fd9a425403245b1a8f03ff0a26d6adbf46adaac36733db7bdc464cd4fb32a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e33253230253743253230382e342d626c75652e737667)](https://php.net)[![Performance](https://camo.githubusercontent.com/4fbce528af1314027444c6baa44f443fdf08557d4c4f3bb81d742e2362db8702/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f506572666f726d616e63652d496e64657865642d6f72616e67652e737667)](https://github.com/highperapp/websockets)[![WebSocket](https://camo.githubusercontent.com/1138c90fcfe74d8d2035783bdf34d9ccabde3168f8fbc210d2030b71cfb4ca55/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f576562536f636b65742d524643363435352d677265656e2e737667)](https://tools.ietf.org/html/rfc6455)[![Tests](https://camo.githubusercontent.com/8578f1392f0d3c5aaff254a5d341a08ecceb1ce654347d545e042a001a398a5f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f54657374732d3130302532352d737563636573732e737667)](https://github.com/highperapp/websockets)

**High-performance WebSocket server with O(1) indexed broadcasting and zero-downtime connection preservation. Works standalone or with HighPer Framework.**

> 🔄 **Standalone Library**: Works independently in any PHP application - no framework required!
>
> ✨ **Info**: Full Amp v3 compatibility with improved type safety and API updates

🚀 **Features**
--------------

[](#-features)

### ⚡ **Indexed Broadcasting**

[](#-indexed-broadcasting)

- **O(1) Broadcasting**: IndexedBroadcaster for constant-time message delivery
- **Channel Indexing**: Efficient subscriber management per channel
- **Zero-Downtime Preservation**: Maintain connections during deployments
- **Connection Migration**: Seamless connection handoff between workers

### 🎯 **Performance Optimizations**

[](#-performance-optimizations)

- **High Performance**: Built on AMPHP v3 for true async/await
- **Real-time Streaming**: Advanced streaming with backpressure handling
- **Production-Ready**: Enterprise WebSocket server implementation
- **Ultra-Low Latency**: Sub-millisecond message broadcasting
- **Framework Integration**: Deep HighPer Framework integration
- **Memory Efficient**: Optimized connection and channel management

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

[](#installation)

```
composer require highperapp/websockets
```

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

[](#quick-start)

```
