mirror of
https://github.com/danog/amp.git
synced 2024-12-02 17:37:50 +01:00
Update EventLoopInterface.php
This commit is contained in:
parent
427386ad73
commit
4da85097d5
@ -4,4 +4,53 @@ namespace Interop\Async\EventLoop;
|
||||
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user