|
|
|
@ -277,7 +277,7 @@ template <typename Derived> |
|
|
|
|
class CallWrapper<Derived, absl::void_t<decltype(typename Derived::Call())>> |
|
|
|
|
: public Derived::Call { |
|
|
|
|
public: |
|
|
|
|
explicit CallWrapper(Derived* channel) : Derived::Call() {} |
|
|
|
|
explicit CallWrapper(Derived*) : Derived::Call() {} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// For the original promise scheme polyfill: data associated with once call.
|
|
|
|
@ -347,11 +347,11 @@ inline auto RunCall( |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename Derived> |
|
|
|
|
inline auto RunCall(ServerMetadataHandle (Derived::Call::*fn)( |
|
|
|
|
ClientMetadata& md, Derived* channel), |
|
|
|
|
CallArgs call_args, NextPromiseFactory next_promise_factory, |
|
|
|
|
FilterCallData<Derived>* call_data) |
|
|
|
|
-> ArenaPromise<ServerMetadataHandle> { |
|
|
|
|
inline auto RunCall( |
|
|
|
|
ServerMetadataHandle (Derived::Call::*fn)(ClientMetadata& md, |
|
|
|
|
Derived* channel), |
|
|
|
|
CallArgs call_args, NextPromiseFactory next_promise_factory, |
|
|
|
|
FilterCallData<Derived>* call_data) -> ArenaPromise<ServerMetadataHandle> { |
|
|
|
|
GPR_DEBUG_ASSERT(fn == &Derived::Call::OnClientInitialMetadata); |
|
|
|
|
auto return_md = call_data->call.OnClientInitialMetadata( |
|
|
|
|
*call_args.client_initial_metadata, call_data->channel); |
|
|
|
@ -410,8 +410,7 @@ inline void InterceptClientToServerMessage(const NoInterceptor*, void*, void*, |
|
|
|
|
template <typename Derived> |
|
|
|
|
inline void InterceptClientToServerMessage( |
|
|
|
|
ServerMetadataHandle (Derived::Call::*fn)(const Message&), |
|
|
|
|
typename Derived::Call* call, Derived* channel, |
|
|
|
|
CallSpineInterface* call_spine) { |
|
|
|
|
typename Derived::Call* call, Derived*, CallSpineInterface* call_spine) { |
|
|
|
|
GPR_DEBUG_ASSERT(fn == &Derived::Call::OnClientToServerMessage); |
|
|
|
|
call_spine->server_to_client_messages().sender.InterceptAndMap( |
|
|
|
|
[call, call_spine](MessageHandle msg) -> absl::optional<MessageHandle> { |
|
|
|
@ -596,8 +595,7 @@ inline void InterceptServerToClientMessage(const NoInterceptor*, void*, void*, |
|
|
|
|
template <typename Derived> |
|
|
|
|
inline void InterceptServerToClientMessage( |
|
|
|
|
ServerMetadataHandle (Derived::Call::*fn)(const Message&), |
|
|
|
|
typename Derived::Call* call, Derived* channel, |
|
|
|
|
CallSpineInterface* call_spine) { |
|
|
|
|
typename Derived::Call* call, Derived*, CallSpineInterface* call_spine) { |
|
|
|
|
GPR_DEBUG_ASSERT(fn == &Derived::Call::OnServerToClientMessage); |
|
|
|
|
call_spine->server_to_client_messages().sender.InterceptAndMap( |
|
|
|
|
[call, call_spine](MessageHandle msg) -> absl::optional<MessageHandle> { |
|
|
|
|