سؤال

All the examples I have seen till now point me to a client server where a client has just one functionality (ex: get the server date and time) and the server just serves this functionality. So when the Server gets a request from the client it knows what business object's function has to called to serve the request. But, when building complex applications (ex: a school management system) there are a lot of business objects on the server, now, how does the client tell the server which business object's function to be called. This whole question is with regard to QT

هل كانت مفيدة؟

المحلول

You can use customize Signals and Slots for your purpose.

From Client side

Just emit signals with passing parameter as a job id or job name

ex: emit signalA(jobId);

and at server side, connect the signal to required function

ex: connect(client, SIGNAL(signalA(int jobId)), this, SLOT(functionA(int jobId)));

I hope this will help you in identifying the job

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top