MCPcopy Create free account
hub / github.com/apache/brpc / CallMethod

Method CallMethod

test/brpc_channel_unittest.cpp:354–372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

352 }
353
354 void CallMethod(brpc::ChannelBase* channel,
355 brpc::Controller* cntl,
356 test::EchoRequest* req, test::EchoResponse* res,
357 bool async, bool destroy = false) {
358 google::protobuf::Closure* done = NULL;
359 brpc::CallId sync_id = { 0 };
360 if (async) {
361 sync_id = cntl->call_id();
362 done = brpc::DoNothing();
363 }
364 ::test::EchoService::Stub(channel).Echo(cntl, req, res, done);
365 if (async) {
366 if (destroy) {
367 delete channel;
368 }
369 // Callback MUST be called for once and only once
370 bthread_id_join(sync_id);
371 }
372 }
373
374 void CallMethod(brpc::ChannelBase* channel,
375 brpc::Controller* cntl,

Callers 15

replay_threadFunction · 0.45
access_threadFunction · 0.45
call_methodMethod · 0.45
default_methodMethod · 0.45
TEST_FFunction · 0.45
incr_threadFunction · 0.45
TESTFunction · 0.45
TEST_FFunction · 0.45
TestGenericCallFunction · 0.45
TestHttpAuthFunction · 0.45
ProcessRpcRequestMethod · 0.45
TEST_FFunction · 0.45

Calls 5

DoNothingFunction · 0.85
bthread_id_joinFunction · 0.85
call_idMethod · 0.80
ComboEchoMethod · 0.80
EchoMethod · 0.45

Tested by

no test coverage detected