-
Notifications
You must be signed in to change notification settings - Fork 10
ASync reader #44
Copy link
Copy link
Open
Labels
Description
Using someones implementation of an event loop and async streams, create an Asynchronous Client
removes the need for acknowledgement handler (a little bit)
interface AsyncMessageHandler {
public function handle(MessageInterface $message, callable $done) : PromiseInterface
}
class Reader {
public function asyncRead(AsyncMessageHandler $handler, int $num) {
// read
$handler->handle($message, $done)
->then($this->acknowledge, $this->reject);
}
}Reactions are currently unavailable