Skip to content

Commit

Permalink
fix(client): update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
asiries335 committed May 3, 2020
1 parent 8a34cee commit b036e30
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@ Need version Redis >= 5.0

## Usage

_start working_
_Start working_
```php

<?php

require __DIR__.'/vendor/autoload.php';



// Class predis.
$redisClient = new Redis();
$redisClient->connect('127.0.0.1', '6379');

Expand Down Expand Up @@ -81,6 +80,16 @@ $collection = $client->stream('test')->get();
]
}

```

_Listen to a stream_

```php
$client->stream('test')->listen(
function (\Asiries335\redisSteamPhp\Data\Message $message) {
// Your code...
}
);
```

The method works as event-loop

0 comments on commit b036e30

Please sign in to comment.