Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to ext-websocket are documented here.

## Unreleased

### Changed

- Moved benchmarks to the separate [`php-websocket-bench`](https://github.com/axcherednikov/php-websocket-bench) repository.

## 1.1.0 - 2026-05-23

### Added
Expand Down Expand Up @@ -52,7 +58,7 @@ All notable changes to ext-websocket are documented here.

### Changed

- Simplified the root README and moved detailed benchmark output to `bench/README.md`.
- Simplified the root README and moved detailed benchmark output out of the root README.

## 0.7.0 - 2026-05-18

Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ use WebSocket\Server;

$server = new Server();
$server->listen('127.0.0.1', 8080);
$server->subprotocols('chat.v1');

$server->onOpen(static function (Connection $connection): void {
echo "open {$connection->id}\n";
echo "open {$connection->id}";
echo $connection->subprotocol ? " ({$connection->subprotocol})\n" : "\n";
});

$server->onMessage(static function (Connection $connection, string $message): void {
Expand Down Expand Up @@ -113,6 +115,7 @@ Methods:
|---|---|
| `__construct(ServerOptions\|array $options = [])` | Create a server |
| `listen(string $host, int $port): void` | Bind address for `run()` |
| `subprotocols(string ...$protocols): void` | Configure supported `Sec-WebSocket-Protocol` tokens |
| `onOpen(Closure $handler): void` | Register upgraded connection callback |
| `onMessage(Closure $handler): void` | Register text/binary message callback |
| `onClose(Closure $handler): void` | Register close callback |
Expand All @@ -130,6 +133,7 @@ Methods:
| `isOpen(): bool` | Check connection state |
| `readonly string $id` | Connection id |
| `readonly string $remoteAddress` | Remote peer address |
| `readonly ?string $subprotocol` | Negotiated subprotocol, or `null` |

### `WebSocket\Protocol`

Expand All @@ -151,9 +155,9 @@ Methods:

## Benchmarks

Detailed benchmark results and commands live in [bench/README.md](bench/README.md).
Detailed benchmark results and commands live in the separate [php-websocket-bench](https://github.com/axcherednikov/php-websocket-bench) repository.

The current benchmark suite covers protocol encode/decode, server accept/upgrade runtime, and real `ws://` / `wss://` message runtime against AMPHP, Workerman, and OpenSwoole.
The benchmark suite covers protocol encode/decode, server upgrade runtime, and real `ws://` / `wss://` message runtime against AMPHP, Workerman, OpenSwoole, and Ratchet.

## Production

Expand Down
177 changes: 0 additions & 177 deletions bench/README.md

This file was deleted.

17 changes: 0 additions & 17 deletions bench/composer.json

This file was deleted.

Loading
Loading