Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clue/ssdp-react Build Status

Async Simple Service Discovery Protocol (SSDP), built on top of React PHP.

As used in Univeral Plug and Play (UPnP). Commonly used by multimedia devices in home networks etc.

See UPnP device architecture definition (PDF). Uses Multicast and Unicast UDP HTTP messages (HTTPMU/HTTPU), expired IETF draft: https://tools.ietf.org/html/draft-goland-http-udp-01

This is an alternative to 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 search all available UPnP devices in your network:

$loop = React\EventLoop\Factory::create();
$client = new Client($loop);

$client->search()->then(
    function () {
        echo 'Search completed' . PHP_EOL;
    },
    function($e) {
        echo 'There was an error searching for devices: ' . $e . PHP_EOL;
    },
    function ($progress) {
        echo 'Found a device: ' . PHP_EOL;
        var_dump($progress);
        echo PHP_EOL;
    }
);

$loop->run();

See also the examples.

Install

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

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

License

MIT

About

Async Simple Service Discovery Protocol (SSDP), part of Univeral Plug and Play (UPnP)

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages