Page 1 of 1

RCFProto how to do callback connection

Posted: Thu Mar 03, 2016 4:06 am
by fchen22
hi everybody,
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.
  RcfChannelPtr rcfChannelPtr( new RcfProtoChannel(clientTransportPtr) );
  RCF::Lock lock(gCallbackTransportMutex);
  gCallbackClients.push_back( rcfChannelPtr );
the compiler output:
../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.

Re: RCFProto how to do callback connection

Posted: Thu Mar 10, 2016 12:37 am
by jarl

RCFProto does not yet support callback connections. However, it is high on the list of items we want to implement in the next version. Unfortunately I can't give a timetable for that though.