From d603870d7f7cc1b3e2eef29619d3bbc656d1fa83 Mon Sep 17 00:00:00 2001 From: Christopher Vagnetoft Date: Sat, 24 Feb 2024 00:31:45 +0100 Subject: [PATCH] Updated readme --- README.md | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 4460f4d..7e623ce 100644 --- a/README.md +++ b/README.md @@ -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