Updated readme

This commit is contained in:
Chris 2024-02-24 00:31:45 +01:00
parent 16fa77229c
commit d603870d7f

View File

@ -1,12 +1,6 @@
# ReactPHP WebSockets
## Installing
It is recommended that you use composer to install the package:
```shell
$ composer require noccylabs/react-websocket:^0.1.0
```
This is a library that implements WebSocket support on top of ReactPHPs HttpServer. In the process, the underlaying request and endpoint info is made available to your code. What happens next is up to you.
## Missing Features
@ -17,11 +11,21 @@ The following features are missing, or work in progress:
* Exceptions
* Full tested support for fragmented frames
## Why not Ratchet?
## Installing
Ratchet is great! I've used Ratchet in the past, and it is a fantastic piece of code. It is however more application-centered, which means it doesn't do events and all that beautiful magic we've come to love ReactPHP for.
Install using composer:
TL;DR - If you need to build an application with neatly wrapped classes without caring to much about the internals, go with Ratchet. If you want to work with websockets in the same way you work with sockets in ReactPHP, go with this library.
```shell
$ composer require noccylabs/react-websocket:^0.1.0
```
Note that you may need additional permissions to be able to access the repository. If so, clone it locally:
```shell
$ git clone https://dev.noccylabs.info/noccy/react-websocket ~/react-websocket
$ composer config repositories.react-websocket vcs ~/react-websocket
$ composer require noccylabs/react-websocket:^0.1.0 # ^0.1.0 or @dev
```
## Server