From bbb714548cda4b3b932352a70678918226ae8373 Mon Sep 17 00:00:00 2001 From: Simon Frings Date: Thu, 10 Aug 2023 11:13:19 +0200 Subject: [PATCH] Improve documentation and fix typo --- README.md | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 69a53fb..f475c26 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,17 @@ # clue/reactphp-mdns -[![CI status](https://github.com/clue/reactphp-mdns/workflows/CI/badge.svg)](https://github.com/clue/reactphp-mdns/actions) +[![CI status](https://github.com/clue/reactphp-mdns/actions/workflows/ci.yml/badge.svg)](https://github.com/clue/reactphp-mdns/actions) [![installs on Packagist](https://img.shields.io/packagist/dt/clue/mdns-react?color=blue&label=installs%20on%20Packagist)](https://packagist.org/packages/clue/mdns-react) Simple, async multicast DNS (mDNS) resolver for zeroconf networking, built on top of [ReactPHP](https://reactphp.org/). [Multicast DNS](http://www.multicastdns.org/) name resolution is commonly used -as part of [zeroconf networking](http://en.wikipedia.org/wiki/Zero-configuration_networking). +as part of [zeroconf networking](https://en.wikipedia.org/wiki/Zero-configuration_networking). It is used by Mac OS X (Bonjour), many Linux distributions (Avahi) and quite a few other networking devices such as printers, camers etc. to resolve hostnames of your local LAN clients to IP addresses. -This library implements the mDNS protocol as defined in [RFC 6762](http://tools.ietf.org/html/rfc6762). +This library implements the mDNS protocol as defined in [RFC 6762](https://tools.ietf.org/html/rfc6762). Note that this protocol is related to, but independent of, DNS-Based Service Discovery (DNS-SD) -as defined in [RFC 6763](http://tools.ietf.org/html/rfc6763). +as defined in [RFC 6763](https://tools.ietf.org/html/rfc6763). **Table of Contents** @@ -88,7 +88,7 @@ $resolver->lookup($hostname)->then( // IP successfully resolved }, function (Exception $e) { - // an error occured while looking up the given hostname + // an error occurred while looking up the given hostname } }); ``` @@ -116,7 +116,7 @@ try { $ip = Block\await($promise, $loop); // IP successfully resolved } catch (Exception $e) { - // an error occured while performing the request + // an error occurred while performing the request } ``` @@ -135,11 +135,11 @@ Please refer to [clue/reactphp-block](https://github.com/clue/reactphp-block#rea ## Install -The recommended way to install this library is [through Composer](http://getcomposer.org). -[New to Composer?](http://getcomposer.org/doc/00-intro.md) +The recommended way to install this library is [through Composer](https://getcomposer.org/). +[New to Composer?](https://getcomposer.org/doc/00-intro.md) ```bash -$ composer require clue/mdns-react:~0.2.0 +composer require clue/mdns-react:~0.2.0 ``` See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades. @@ -147,31 +147,34 @@ See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades. This project aims to run on any platform and thus does not require any PHP extensions and supports running on legacy PHP 5.3 through current PHP 8+ and HHVM. -It's *highly recommended to use PHP 7+* for this project. +It's *highly recommended to use the latest supported PHP version* for this project. ## Tests To run the test suite, you first need to clone this repo and then install all -dependencies [through Composer](https://getcomposer.org): +dependencies [through Composer](https://getcomposer.org/): ```bash -$ composer install +composer install ``` To run the test suite, go to the project root and run: ```bash -$ php vendor/bin/phpunit +vendor/bin/phpunit ``` ## License -MIT +This project is released under the permissive [MIT license](LICENSE). + +> Did you know that I offer custom development services and issuing invoices for + sponsorships of releases and for contributions? Contact me (@clue) for details. ## More -* Multicast DNS is defined in [RFC 6762](http://tools.ietf.org/html/rfc6762), in particular +* Multicast DNS is defined in [RFC 6762](https://tools.ietf.org/html/rfc6762), in particular this specification also highlights the - [differences to normal DNS operation](http://tools.ietf.org/html/rfc6762#section-19). + [differences to normal DNS operation](https://tools.ietf.org/html/rfc6762#section-19). * Please refer to the [react/dns component](https://github.com/reactphp/dns#readme) for more details about normal DNS operation.