I have go through the call connection example code in RCF user guide, it works. Now we need use RCFProto as it has integrated Protobuf. The question is how to get the RcfProtoChannel from the server side onCallbackConnectionCreated?
I tried this code below, but it does not work,
Code: Select all
void onCallbackConnectionCreated(
RCF::RcfSessionPtr sessionPtr,
RCF::ClientTransportAutoPtr clientTransportPtr)
{
// Store the callback client transport in a global variable for later use.
#if RCFPROTO_CALLBACK_CONNECTION
RcfChannelPtr rcfChannelPtr( new RcfProtoChannel(clientTransportPtr) );
RCF::Lock lock(gCallbackTransportMutex);
gCallbackClients.push_back( rcfChannelPtr );
#endif
}
../DemoServer.cpp:110: error: no matching function for call to ‘RCF::RcfProtoChannel::RcfProtoChannel(RCF::ClientTransportAutoPtr&)’
../../src/RCFProto.hpp:401: note: candidates are: RCF::RcfProtoChannel::RcfProtoChannel(const RCF::Endpoint&)
../../src/RCFProto.hpp:373: note: RCF::RcfProtoChannel::RcfProtoChannel(const RCF::RcfProtoChannel&)
it seems we could not get RcfProtoChannel from the ClientTransportAutoPtr.