1
0
mirror of https://github.com/danog/amp.git synced 2024-12-11 08:59:46 +01:00

Update EventLoopInterface.php

This commit is contained in:
Andrew Carter 2016-02-17 15:25:39 +00:00
parent 427386ad73
commit 4da85097d5

View File

@ -4,4 +4,53 @@ namespace Interop\Async\EventLoop;
interface EventLoopInterface interface EventLoopInterface
{ {
/**
* @return void
*/
public function run(callable $onStart = null);
/**
* @return void
*/
public function tick(bool $block = true);
/**
* @return void
*/
public function stop();
/**
* @return Watcher
*/
public function queue(callable $callback, ...$args);
/**
* @return Watcher
*/
public function timer(callable $callback, float $time, $data = null);
/**
* @return Watcher
*/
public function periodic(callable $callback, float $interval, $data = null);
/**
* @return Watcher
*/
public function onReadable($stream, callable $callback, $data = null);
/**
* @return Watcher
*/
public function onWritable($stream, callable $callback, $data = null);
/**
* @return Watcher
*/
public function onSignal(int $signo, callable $callback, $data = null);
/**
* @return Watcher
*/
public function onError(callable $callback);
} }