Async call from client app

Posted:
Thu Aug 09, 2012 5:40 pm
by nickla
How can i use async calls from client app?
I found use of QxDaoAsync in qxServiceServer only.
I want to make calls to server that will not stop execution of client code.
Re: Async call from client app

Posted:
Thu Aug 09, 2012 5:45 pm
by nickla
I found answer in qxClient code.
- Code: Select all
void main_dlg::onClickBtnDateTimeAsync()
{
if (m_pDateTimeAsync) { qDebug("[QxOrm] '%s' transaction is already running", "server_infos::get_current_date_time"); return; }
// Create service and call method to retrieve current server date-time (async mode)
server_infos_ptr service = server_infos_ptr(new server_infos());
m_pDateTimeAsync.reset(new qx::service::QxClientAsync());
QObject::connect(m_pDateTimeAsync.get(), SIGNAL(finished()), this, SLOT(onDateTimeAsyncFinished()));
m_pDateTimeAsync->setService(service, "get_current_date_time");
m_pDateTimeAsync->start();
}
This topic is closed

Re: Async call from client app

Posted:
Fri Aug 10, 2012 9:34 am
by qxorm
This topic is closed

Cool

The answer is also in the tutorial, here :
http://www.qxorm.com/qxorm_en/tutorial_2.html#tuto_302