graze / graze/queue

ASync reader

Open
#44 1 comment 0 reactions 0 assignees View on GitHub
hackos Help Wanted
Dominant language
PHP
Stars
49
Forks
10
PR merge metrics
No merged PRs in 30d

Description

Using someones implementation of an event loop and async streams, create an Asynchronous Client

removes the need for acknowledgement handler (a little bit)

```php
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);
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.