diff options
author | 2015-10-13 16:17:26 -0700 | |
---|---|---|
committer | 2015-10-13 16:17:26 -0700 | |
commit | 0fe72429a03dd1ac6081ee8efe8fe7b85da7bef3 (patch) | |
tree | e18efd405fce4cb017105fedf9e1cef5585824e0 /src/core/client_config/subchannel.h | |
parent | 7b1bd2c2713c9d505094ab728a08d4c94f15c6fa (diff) | |
parent | bee8f104c0827bc829402d79c8302835adfc37f9 (diff) |
Merge branch 'master' of github.com:grpc/grpc into microchannels
Diffstat (limited to 'src/core/client_config/subchannel.h')
-rw-r--r-- | src/core/client_config/subchannel.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/core/client_config/subchannel.h b/src/core/client_config/subchannel.h index f9bc0c2d2f..ec1cc7cc69 100644 --- a/src/core/client_config/subchannel.h +++ b/src/core/client_config/subchannel.h @@ -75,12 +75,22 @@ void grpc_subchannel_call_unref(grpc_exec_ctx *exec_ctx, grpc_subchannel_call *call GRPC_SUBCHANNEL_REF_EXTRA_ARGS); -/** construct a call (possibly asynchronously) */ -void grpc_subchannel_create_call(grpc_exec_ctx *exec_ctx, - grpc_subchannel *subchannel, - grpc_pollset *pollset, - grpc_subchannel_call **target, - grpc_closure *notify); +typedef enum { + GRPC_SUBCHANNEL_CALL_CREATE_READY, + GRPC_SUBCHANNEL_CALL_CREATE_PENDING +} grpc_subchannel_call_create_status; + +/** construct a subchannel call (possibly asynchronously). + * + * If the returned status is \a GRPC_SUBCHANNEL_CALL_CREATE_READY, the call will + * return immediately and \a target will point to a connected \a subchannel_call + * instance. Note that \a notify will \em not be invoked in this case. + * Otherwise, if the returned status is GRPC_SUBCHANNEL_CALL_CREATE_PENDING, the + * subchannel call will be created asynchronously, invoking the \a notify + * callback upon completion. */ +grpc_subchannel_call_create_status grpc_subchannel_create_call( + grpc_exec_ctx *exec_ctx, grpc_subchannel *subchannel, grpc_pollset *pollset, + grpc_subchannel_call **target, grpc_closure *notify); /** cancel \a call in the waiting state. */ void grpc_subchannel_cancel_waiting_call(grpc_exec_ctx *exec_ctx, |