diff --git a/src/core/channel/http_client_filter.c b/src/core/channel/http_client_filter.c index 62a7a1e7d9f..08a2c0df3c0 100644 --- a/src/core/channel/http_client_filter.c +++ b/src/core/channel/http_client_filter.c @@ -43,8 +43,12 @@ typedef struct call_data { int got_initial_metadata; grpc_stream_op_buffer *recv_ops; - grpc_iomgr_closure *on_done_recv; + /** Closure to call when finished with the hc_on_recv hook */ + grpc_iomgr_closure *on_done_recv; + /** Receive closures are chained: we inject this closure as the on_done_recv + up-call on transport_op, and remember to call our on_done_recv member + after handling it. */ grpc_iomgr_closure hc_on_recv; } call_data; diff --git a/src/core/channel/http_server_filter.c b/src/core/channel/http_server_filter.c index e5ce7a5dd87..d3a01fd1a87 100644 --- a/src/core/channel/http_server_filter.c +++ b/src/core/channel/http_server_filter.c @@ -47,7 +47,11 @@ typedef struct call_data { grpc_linked_mdelem status; grpc_stream_op_buffer *recv_ops; + /** Closure to call when finished with the hs_on_recv hook */ grpc_iomgr_closure *on_done_recv; + /** Receive closures are chained: we inject this closure as the on_done_recv + up-call on transport_op, and remember to call our on_done_recv member + after handling it. */ grpc_iomgr_closure hs_on_recv; } call_data; diff --git a/src/core/iomgr/iomgr.h b/src/core/iomgr/iomgr.h index 265c817db1d..6d4a82917b1 100644 --- a/src/core/iomgr/iomgr.h +++ b/src/core/iomgr/iomgr.h @@ -73,6 +73,8 @@ void grpc_iomgr_shutdown(void); * Can be called from within a callback or from anywhere else */ void grpc_iomgr_add_callback(grpc_iomgr_closure *closure); +/** As per grpc_iomgr_add_callback, with the ability to set the success + argument. */ void grpc_iomgr_add_delayed_callback(grpc_iomgr_closure *iocb, int success); #endif /* GRPC_INTERNAL_CORE_IOMGR_IOMGR_H */