question about connection check

RCF support and general discussion.
Post Reply
MyongKyun
Posts: 7
Joined: Tue Apr 30, 2013 1:09 am

question about connection check

Post by MyongKyun »

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;
}

MyongKyun
Posts: 7
Joined: Tue Apr 30, 2013 1:09 am

Re: question about connection check

Post by MyongKyun »

if you need more detail description, please let me know.

jarl
Posts: 238
Joined: Mon Oct 03, 2011 4:53 am
Contact:

Re: question about connection check

Post by jarl »

From the server, you can only send pings on the second connection. The first connection is controlled by the client, so the server cannot ping it.

If you need to know on the server-side that the first connection is up, you'll need to implement that at the application level, by sending a message on the second connection instructing the client to ping the first connection.
Kind Regards

Jarl Lindrud
Delta V Software
http://www.deltavsoft.com

Post Reply