Permalink
Browse files

Moved event emitter to util, also accepts listener context, see #529

  • Loading branch information...
dcodeIO committed Dec 8, 2016
1 parent f1370ff commit e4faf7fac9b34d4776f3c15dfef8d2ae54104567

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
BIN +95 Bytes (100%) dist/protobuf.min.js.gz
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -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);
});
Oops, something went wrong.

0 comments on commit e4faf7f

Please sign in to comment.