diff options
author | 2015-01-26 12:57:10 -0800 | |
---|---|---|
committer | 2015-01-26 12:57:10 -0800 | |
commit | d3e95a36327c7a2249434e554846c8e44aa7daa0 (patch) | |
tree | df7137221b1edd9367f6057166f35a90ee1340f6 /src/node/client.js | |
parent | 6cf933c4d2f618b3779b4a4f5b563aadb6f829ed (diff) |
Added cancel to surface calls
Diffstat (limited to 'src/node/client.js')
-rw-r--r-- | src/node/client.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/node/client.js b/src/node/client.js index 7007852b93..a039b0dcfa 100644 --- a/src/node/client.js +++ b/src/node/client.js @@ -161,6 +161,14 @@ GrpcClientStream.prototype._write = function(chunk, encoding, callback) { }; /** + * Cancel the ongoing call. If the call has not already finished, it will finish + * with status CANCELLED. + */ +GrpcClientStream.prototype.cancel = function() { + self._call.cancel(); +}; + +/** * Make a request on the channel to the given method with the given arguments * @param {grpc.Channel} channel The channel on which to make the request * @param {string} method The method to request |