Changeset View
Changeset View
Standalone View
Standalone View
native/cpp/CommonCpp/grpc/ClientGetReadReactor.cpp
Show All 10 Lines | |||||
} | } | ||||
void ClientGetReadReactor::OnReadDone(bool ok) { | void ClientGetReadReactor::OnReadDone(bool ok) { | ||||
if (!ok) { | if (!ok) { | ||||
return; | return; | ||||
} | } | ||||
std::lock_guard<std::mutex> guard{this->onReadDoneCallbackMutex}; | std::lock_guard<std::mutex> guard{this->onReadDoneCallbackMutex}; | ||||
if (this->onReadDoneCallback) { | if (this->onReadDoneCallback) { | ||||
this->onReadDoneCallback(this->response.payload()); | this->onReadDoneCallback(this->response.responsemessage().payload()); | ||||
} | } | ||||
StartRead(&(this->response)); | StartRead(&(this->response)); | ||||
} | } | ||||
void ClientGetReadReactor::close() { | void ClientGetReadReactor::close() { | ||||
{ | { | ||||
std::lock_guard<std::mutex> guard{this->setReadyStateMutex}; | std::lock_guard<std::mutex> guard{this->setReadyStateMutex}; | ||||
this->setReadyState(SocketStatus::CLOSING); | this->setReadyState(SocketStatus::CLOSING); | ||||
▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines |