Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation and fix typo #19

Merged
merged 1 commit into from
Sep 13, 2023
Merged
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
35 changes: 19 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -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**

Expand Down Expand Up @@ -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
}
});
```
Expand Down Expand Up @@ -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
}
```

Expand All @@ -135,43 +135,46 @@ 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.

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.