virtual void stress(const CallbackPrx& callback, const CallbackReceiverPrx& receiver) { try { CallbackPrx cb = CallbackPrx::uncheckedCast(callback->ice_twoway()); Context context; context["_fwd"] = "t"; while(true) { cb->initiateCallbackWithPayload(receiver, context); test(_callbackReceiver->callbackWithPayloadOK()); IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(10)); } } catch(const Ice::ConnectionLostException&) { // Session was destroyed. } catch(const Ice::ObjectNotExistException&) { // This might be raised by the CallbackI implementation if it can't invoke on the // callback receiver because the session is being destroyed concurrently. } catch(const Ice::CommunicatorDestroyedException&) { // This might happen if the retry fails because the communicator is destroyed. } catch(const Ice::Exception& ex) { cerr << ex << endl; test(false); } }
virtual void stress(const CallbackPrx& callback, const CallbackReceiverPrx&) { try { CallbackPrx cb = CallbackPrx::uncheckedCast(callback->ice_twoway()); Context context; context["_fwd"] = "t"; while(true) { cb->ice_ping(context); IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(1)); } } catch(const Ice::ConnectionLostException&) { } catch(const Ice::CommunicatorDestroyedException&) { } catch(const Ice::Exception& ex) { cerr << ex << endl; test(false); } }