PHPackages                             obray/web-socket-server - 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. obray/web-socket-server

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

obray/web-socket-server
=======================

PHP based WebSocket server.

v1.1.0(3w ago)089MITPHPPHP &gt;=8.1

Since Dec 13Pushed 3w agoCompare

[ Source](https://github.com/nateobray/webSocketServer)[ Packagist](https://packagist.org/packages/obray/web-socket-server)[ Docs](http://www.obray.net)[ RSS](/packages/obray-web-socket-server/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (9)Dependencies (2)Versions (10)Used By (0)

obray/web-socket-server
=======================

[](#obrayweb-socket-server)

Small PHP WebSocket server library built on `obray/socket-server`.

This package handles the WebSocket upgrade, frame parsing, protocol close responses, and dispatches messages to an application handler. Application behavior such as chat rooms, alert routing, authentication, presence, and connection metadata should live in the handler that implements the library interface.

Install
-------

[](#install)

```
composer require obray/web-socket-server
```

For local development with this checkout next to `SocketServer`, the example in `examples/broadcast.php` includes a small fallback autoloader.

Start An Echo Server
--------------------

[](#start-an-echo-server)

```
