Symbian
Symbian OS Library

FAQ-0491 Can a server process more than one request simultaneously?

[Index][spacer] [Previous] [Next]



 

Classification: C++ Category: Client-Server
Created: 04/27/2000 Modified: 09/05/2001
Number: FAQ-0491
Platform: ER5, Symbian OS v6.0, Symbian OS v6.1

Question:
Can a server process more than one request simultaneously and if so how?

Answer:
There is no limit imposed by Symbian OS on the number of simultaneous requests that may be processed by a server, it is down to the server designer to architect the server according to their requirements.

When a server receives a request it calls the ServiceL on the session associated with the request and then it calls the CServer::Restart() method which sets the server active object (AO) to active, if there is another request waiting then it will run again irrespective of whether the previous request has completed. If a server is to process multiple requests simultaneously then a typical scenario might be that the sessions ServiceL activates some asynchronous service using an AO whose RunL will complete the request (the request having been cached in say an AO data member). Once the AO has been activated the ServiceL can return so enabling the server to Restart() and subsequently receive another request to be processed simultaneously with the previous one.