Asynchronous client
Posted: Tue Dec 03, 2013 12:33 pm
Hello,
I can't get the asynchronous client mode to work in C++. The same call made synchronously works perfectly.
Stepping through the code, I see this in RcfProtoChannel::onCompletionCpp():
and further down, when not synchronous mode:
If I understand correctly, mpResponse will always be NULL, since it was set at the beginning of the function, and the response buffer will never be parsed.
Or am I doing something wrong?
I can't get the asynchronous client mode to work in C++. The same call made synchronously works perfectly.
Stepping through the code, I see this in RcfProtoChannel::onCompletionCpp():
Code: Select all
void RcfProtoChannel::onCompletionCpp()
{
Message * pResponse = mpResponse;
Closure * pClosure = mpClosure;
mpRequest = NULL;
mpResponse = NULL;
mpClosure = NULL;
Code: Select all
if (mError.good() && mpResponse)
{
mpResponse->ParseFromArray(
mResponseBuffer.getPtr(),
(int) mResponseBuffer.getLength());
}
Or am I doing something wrong?