diff options
author | Vijay Pai <vpai@google.com> | 2016-08-25 15:33:02 -0700 |
---|---|---|
committer | Vijay Pai <vpai@google.com> | 2016-08-25 15:33:02 -0700 |
commit | cdc253535bb879918b9bd66b29007f27219f6e2e (patch) | |
tree | 9208a299a0747e18628c03828ce3c93d3b00fca2 /include/grpc++/impl/codegen | |
parent | ac4113bef128abd57cc166a4921063b0b4c5278d (diff) |
Remove FC_UNARY enum and treat it more like a special case of BIDI_STREAMING
in all cases
Diffstat (limited to 'include/grpc++/impl/codegen')
-rw-r--r-- | include/grpc++/impl/codegen/rpc_method.h | 3 | ||||
-rw-r--r-- | include/grpc++/impl/codegen/service_type.h | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/include/grpc++/impl/codegen/rpc_method.h b/include/grpc++/impl/codegen/rpc_method.h index b55d755075..4897428074 100644 --- a/include/grpc++/impl/codegen/rpc_method.h +++ b/include/grpc++/impl/codegen/rpc_method.h @@ -46,8 +46,7 @@ class RpcMethod { NORMAL_RPC = 0, CLIENT_STREAMING, // request streaming SERVER_STREAMING, // response streaming - BIDI_STREAMING, - FC_UNARY // flow-controlled unary call + BIDI_STREAMING }; RpcMethod(const char* name, RpcType type) diff --git a/include/grpc++/impl/codegen/service_type.h b/include/grpc++/impl/codegen/service_type.h index dcfc6b01b7..4af40422a1 100644 --- a/include/grpc++/impl/codegen/service_type.h +++ b/include/grpc++/impl/codegen/service_type.h @@ -150,8 +150,11 @@ class Service { void MarkMethodFCUnary(int index, MethodHandler* fc_unary_method) { GPR_CODEGEN_ASSERT(methods_[index] && methods_[index]->handler() && "Cannot mark an async or generic method as FCUnary"); - methods_[index]->SetMethodType(::grpc::RpcMethod::FC_UNARY); methods_[index]->SetHandler(fc_unary_method); + + // From the server's point of view, streamed unary is a special + // case of BIDI_STREAMING that has 1 read and 1 write, in that order. + methods_[index]->SetMethodType(::grpc::RpcMethod::BIDI_STREAMING); } private: |