question about connection check
Posted: Thu Jun 27, 2013 6:20 pm
Hi
When use createCallbackConnection() API, there are 2 TCP connection.
I want to check connections wether the first connection is connected (or in an errornous situation) or disconnected.
When I use client->getClientStub().isConnected(), I guess it is only available to check 2nd connection.
Is there way to check 1st connection?
Regard
Mr Lim.
// Client-side
int main()
{
RCF::RcfInitDeinit rcfInit;
// Client needs a RcfServer to accept callback connections.
RCF::RcfServer callbackServer(( RCF::TcpEndpoint() ));
HelloWorldImpl helloWorld;
callbackServer.bind<I_HelloWorld>(helloWorld);
callbackServer.start();
// Establish client connection to server.
RcfClient<I_HelloWorld> client( RCF::TcpEndpoint(50001) );
// Create the callback connection.
RCF::createCallbackConnection(client, callbackServer);
// Server can now call Print() on the helloWorld object.
// ...
return 0;
}
When use createCallbackConnection() API, there are 2 TCP connection.
I want to check connections wether the first connection is connected (or in an errornous situation) or disconnected.
When I use client->getClientStub().isConnected(), I guess it is only available to check 2nd connection.
Is there way to check 1st connection?
Regard
Mr Lim.
// Client-side
int main()
{
RCF::RcfInitDeinit rcfInit;
// Client needs a RcfServer to accept callback connections.
RCF::RcfServer callbackServer(( RCF::TcpEndpoint() ));
HelloWorldImpl helloWorld;
callbackServer.bind<I_HelloWorld>(helloWorld);
callbackServer.start();
// Establish client connection to server.
RcfClient<I_HelloWorld> client( RCF::TcpEndpoint(50001) );
// Create the callback connection.
RCF::createCallbackConnection(client, callbackServer);
// Server can now call Print() on the helloWorld object.
// ...
return 0;
}