8000 GitHub - clue-labs/reactphp-mdns: Simple async multicast DNS (MDNS) lookups, built on top of React PHP
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

clue-labs/reactphp-mdns

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clue/mdns-react Build Status

Simple, async multicast DNS (mDNS) resolver library, built on top of React PHP.

Multicast DNS name resolution is commonly used as part of zeroconf networking ala Bonjour/Avahi. It is defined in RFC 6762, in particular this specification also highlights the differences to normal DNS operation.

The mDNS protocol is related to, but independent of, DNS-Based Service Discovery (DNS-SD) as defined in RFC 6763.

Note: This project is in early alpha stage! Feel free to report any issues you encounter.

Quickstart example

Once installed, you can use the following code to look up the address of a local domain name:

$loop = React\EventLoop\Factory::create();
$factory = new Factory($loop);
$resolver = $factory->createResolver();

$resolver->lookup('hostname.local')->then(function ($ip) {
   echo 'Found: ' . $ip . PHP_EOL;
});

$loop->run();

See also the examples.

Install

The recommended way to install this library is through composer. New to composer?

{
    "require": {
        "clue/mdns-react": "dev-master"
    }
}

License

MIT

About

Simple async multicast DNS (MDNS) lookups, built on top of React PHP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%
0