diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:45:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:45:49 +0000 |
commit | 0ff39c83d38ce538a9f5dba53eca0fa9cb16d9e6 (patch) | |
tree | 84c735df2e97350a721273e9dd425729d43cc8a2 /vendor/textalk/websocket/README.md | |
parent | Initial commit. (diff) | |
download | icingaweb2-module-pdfexport-upstream/0.10.2+dfsg1.tar.xz icingaweb2-module-pdfexport-upstream/0.10.2+dfsg1.zip |
Adding upstream version 0.10.2+dfsg1.upstream/0.10.2+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/textalk/websocket/README.md')
-rw-r--r-- | vendor/textalk/websocket/README.md | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/vendor/textalk/websocket/README.md b/vendor/textalk/websocket/README.md new file mode 100644 index 0000000..921efef --- /dev/null +++ b/vendor/textalk/websocket/README.md @@ -0,0 +1,67 @@ +# Websocket Client and Server for PHP + +[](https://github.com/Textalk/websocket-php/actions) +[](https://coveralls.io/github/Textalk/websocket-php) + +This library contains WebSocket client and server for PHP. + +The client and server provides methods for reading and writing to WebSocket streams. +It does not include convenience operations such as listeners and implicit error handling. + +## Documentation + +- [Client](docs/Client.md) +- [Server](docs/Server.md) +- [Message](docs/Message.md) +- [Examples](docs/Examples.md) +- [Changelog](docs/Changelog.md) +- [Contributing](docs/Contributing.md) + +## Installing + +Preferred way to install is with [Composer](https://getcomposer.org/). +``` +composer require textalk/websocket +``` + +* Current version support PHP versions `^7.2|8.0`. +* For PHP `7.1` support use version `1.4`. +* For PHP `^5.4` and `7.0` support use version `1.3`. + +## Client + +The [client](docs/Client.md) can read and write on a WebSocket stream. +It internally supports Upgrade handshake and implicit close and ping/pong operations. + +```php +$client = new WebSocket\Client("ws://echo.websocket.org/"); +$client->text("Hello WebSocket.org!"); +echo $client->receive(); +$client->close(); +``` + +## Server + +The library contains a rudimentary single stream/single thread [server](docs/Server.md). +It internally supports Upgrade handshake and implicit close and ping/pong operations. + +Note that it does **not** support threading or automatic association ot continuous client requests. +If you require this kind of server behavior, you need to build it on top of provided server implementation. + +```php +$server = new WebSocket\Server(); +$server->accept(); +$message = $server->receive(); +$server->text($message); +$server->close(); +``` + +### License and Contributors + +[ISC License](COPYING.md) + +Fredrik Liljegren, Armen Baghumian Sankbarani, Ruslan Bekenev, +Joshua Thijssen, Simon Lipp, Quentin Bellus, Patrick McCarren, swmcdonnell, +Ignas Bernotas, Mark Herhold, Andreas Palm, Sören Jensen, pmaasz, Alexey Stavrov, +Michael Slezak, Pierre Seznec, rmeisler, Nickolay V. Shmyrev, Christoph Kempen, +Marc Roberts, Antonio Mora, Simon Podlipsky. |