Remove PayloadInterface, add README

This commit is contained in:
2020-02-08 22:09:11 +01:00
parent 6a7ea39f5c
commit 4edc6132c4
10 changed files with 234 additions and 93 deletions

View File

@@ -4,12 +4,8 @@ use JoopSchilder\React\Stream\NonBlockingInput\ReadableNonBlockingInputStream;
use React\EventLoop\Factory;
require_once __DIR__ . '/../vendor/autoload.php';
require_once __DIR__ . '/basic_example_classes.php';
require_once __DIR__ . '/demo_classes.php';
/**
* The input will have data available every second.
* After 4 seconds have passed, it will generate an error.
*/
$input = new DemoNonBlockingInput();
$loop = Factory::create();
@@ -19,4 +15,3 @@ $stream->on('error', fn() => print('e'));
$stream->on('close', fn() => print('c'));
$loop->addPeriodicTimer(0.2, fn() => print('.'));
$loop->run();