Skip to content

Commit

Permalink
Moved event emitter to util, also accepts listener context, see #529
Browse files Browse the repository at this point in the history
  • Loading branch information
dcodeIO committed Dec 8, 2016
1 parent f1370ff commit e4faf7f
Show file tree
Hide file tree
Showing 11 changed files with 251 additions and 167 deletions.
185 changes: 109 additions & 76 deletions dist/protobuf.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/protobuf.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/protobuf.min.js

Large diffs are not rendered by default.

Binary file modified dist/protobuf.min.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/protobuf.min.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions scripts/rpc-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ function rpcImpl(method, requestData, callback) {

var greeter = Greeter.create(rpcImpl, true, true);

greeter.on("data", function(response) {
greeter.on("data", function(response, method) {
console.log("data:", response.message);
});

greeter.on("end", function() {
greeter.on("end", function(method) {
console.log("ended.");
});

greeter.on("error", function(err) {
greeter.on("error", function(err, method) {
console.log("error:", err);
});

Expand Down
Loading

0 comments on commit e4faf7f

Please sign in to comment.