Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Cooper <tim.cooper@layeh.com>2015-07-27 16:54:07 +0300
committerMikkel Krautz <mikkel@krautz.dk>2016-05-08 17:45:52 +0300
commitd4b799deb94db0fd3b26de0851a7cc6da48ae6dc (patch)
treec917e5c0896cc44f9b5587db683659769d214a43 /src/murmur/MurmurGRPCImpl.h
parent1253f77edffd1f93161f3713b87ba8af118f28c2 (diff)
grpc: add RPCSingleStreamCall base for single-streaming wrappers
Diffstat (limited to 'src/murmur/MurmurGRPCImpl.h')
-rw-r--r--src/murmur/MurmurGRPCImpl.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/murmur/MurmurGRPCImpl.h b/src/murmur/MurmurGRPCImpl.h
index aacd8e4a8..6871603da 100644
--- a/src/murmur/MurmurGRPCImpl.h
+++ b/src/murmur/MurmurGRPCImpl.h
@@ -194,6 +194,19 @@ public:
};
template <class InType, class OutType>
+class RPCSingleStreamCall : public RPCCall {
+public:
+ InType request;
+ ::grpc::ServerAsyncWriter < OutType > stream;
+ RPCSingleStreamCall(MurmurRPCImpl *rpcImpl) : RPCCall(rpcImpl), stream(&context) {
+ }
+
+ virtual void error(const ::grpc::Status &err) {
+ stream.Finish(err, this->done());
+ }
+};
+
+template <class InType, class OutType>
class RPCStreamStreamCall : public RPCCall {
public:
InType request;