Skip to content

Commit

Permalink
Forward compatibility with Stream v0.5 and upcoming v0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
clue committed Mar 8, 2017
1 parent 26b32eb commit a01c120
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,14 @@ $connection->on('data', function ($chunk) {
echo $data;
});

$conenction->on('end', function () {
echo 'ended';
});

$conenction->on('error', function (Exception $e) {
echo 'error: ' . $e->getMessage();
});

$conenction->on('close', function () {
echo 'closed';
});
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"php": ">=5.3.0",
"evenement/evenement": "~2.0|~1.0",
"react/event-loop": "0.4.*|0.3.*",
"react/stream": "^0.4.5",
"react/stream": "^0.6 || ^0.5 || ^0.4.5",
"react/promise": "^2.0 || ^1.1"
},
"require-dev": {
Expand Down

0 comments on commit a01c120

Please sign in to comment.