set callback for ice connection

crytoskycrytosky Member jack xiangOrganization: qq.comProject: mobile internet app

I want to reclaim some resource when ice connection closed, so i try to use setCallback() function of ice connection. first I need define a class as below:
class MyConnectionCallback: public Ice::ConnectionCallback
{
......
};
then I should call setCallback() function of ice connection to set my own callback object as follows:
curr.con->setCallback(new MyConnectionCallback);

my problem is I can't find which header file I should include for Ice::ConnectionCallback. can somebody help me?
thanks a lot in advance!

Best Answer

  • benoitbenoit Rennes, FranceBenoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Accepted Answer

    Hi,

    Which Ice version do you use? Including <Ice/Ice.h> should be sufficient.

    Cheers,
    Benoit.

Answers

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Accepted Answer

    Hi,

    Which Ice version do you use? Including <Ice/Ice.h> should be sufficient.

    Cheers,
    Benoit.

  • crytoskycrytosky Member jack xiangOrganization: qq.comProject: mobile internet app

    Hi Benoit,
    Thanks for your reply!
    I'm sure that I have included <Ice/Ice.h>. But the Ice version I used is 3.5.1. After updating it to 3.6.2, the problem is gone.
    Thanks again for your help!

Sign In or Register to comment.