PHPackages                             overtrue/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. overtrue/websocket

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

overtrue/websocket
==================

A PHP implementation of WebSocket.

1.0.0(6y ago)561336[3 issues](https://github.com/overtrue/websocket/issues)MITPHPPHP ^7.1.3

Since Jun 26Pushed 6y ago1 watchersCompare

[ Source](https://github.com/overtrue/websocket)[ Packagist](https://packagist.org/packages/overtrue/websocket)[ RSS](/packages/overtrue-websocket/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

 WebSocket
===========

[](#-websocket-)

 A PHP implementation of WebSocket.

Installing
----------

[](#installing)

```
$ composer require overtrue/websocket -vvv
```

Usage
-----

[](#usage)

### Server

[](#server)

```
use Overtrue\WebSocket\Server;

$options = [
    // 'port' => 8000,
    // 'timeout' => 0,
    // ...
];
$server = new Server($options);

$server->accept();

// receive
$message = $server->reveive();

// send
$server->send('Hello overtrue.');
```

### Client

[](#client)

```
use Overtrue\WebSocket\Client;

$client = new Client('ws://127.0.0.1:8000');

// send
$client->send('Hello overtrue.');

// receive
$message = $client->reveive();
```

Contributing
------------

[](#contributing)

You can contribute in one of three ways:

1. File bug reports using the [issue tracker](https://github.com/overtrue/websocket/issues).
2. Answer questions or fix bugs on the [issue tracker](https://github.com/overtrue/websocket/issues).
3. Contribute new features or update the wiki.

*The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.*

License
-------

[](#license)

MIT

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2515d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c507e57eab402e81335012357b7d7df6c5cafda3073adcc94b475037127d263f?d=identicon)[overtrue](/maintainers/overtrue)

---

Top Contributors

[![overtrue](https://avatars.githubusercontent.com/u/1472352?v=4)](https://github.com/overtrue "overtrue (7 commits)")

---

Tags

php-websocketphp-websocket-clientwebsocketwebsocket-clientwebsocket-server

### Embed Badge

![Health badge](/badges/overtrue-websocket/health.svg)

```
[![Health](https://phpackages.com/badges/overtrue-websocket/health.svg)](https://phpackages.com/packages/overtrue-websocket)
```

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
