Skip to content
Snippets Groups Projects
Commit d95a16c4 authored by Jun Yang's avatar Jun Yang
Browse files

Added echoing of requested stock symbol.

This makes the example more realistic.
parent 09e4ea1a
No related branches found
No related tags found
No related merge requests found
...@@ -38,7 +38,7 @@ var examples = grpc.load(__dirname + '/stock.proto').examples; ...@@ -38,7 +38,7 @@ var examples = grpc.load(__dirname + '/stock.proto').examples;
var StockServer = grpc.buildServer([examples.Stock.service]); var StockServer = grpc.buildServer([examples.Stock.service]);
function getLastTradePrice(call, callback) { function getLastTradePrice(call, callback) {
callback(null, {price: 88}); callback(null, {symbol: call.request.symbol, price: 88});
} }
function watchFutureTrades(call) { function watchFutureTrades(call) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment