Added echoing of requested stock symbol.

This makes the example more realistic.
This commit is contained in:
Jun Yang 2015-02-09 13:43:56 -08:00
parent 7fab056c99
commit 187580595f

View File

@ -38,7 +38,7 @@ var examples = grpc.load(__dirname + '/stock.proto').examples;
var StockServer = grpc.buildServer([examples.Stock.service]);
function getLastTradePrice(call, callback) {
callback(null, {price: 88});
callback(null, {symbol: call.request.symbol, price: 88});
}
function watchFutureTrades(call) {