Server services

Describes asynchronous services provided by the client-server framework.

The majority of Symbian platform asynchronous services are provided by servers written in accordance with the Symbian platform client-server framework. A server is a thread running in user mode, which services requests from client threads also running in user mode. An example of asynchronous service provided by a server is the EventReady(TRequestStatus* aStat) function provided by the RWsSession class — the client API to the window server. This function requests an event from the window server, which the user program can extract and analyse using other RWsSession functions.

As with services provided by the kernel, server-provided services are presented to clients through a client API, typically an R class such as RWsSession, derived from RSessionBase. When the RSessionBase is opened, a server-side object is created and the client’s thread id is noted. Request functions are converted into an inter-thread message which encapsulates all the parameters. When request functions complete, the server posts the request status and signals the client thread’s request semaphore.

As with services provided by the kernel, the process of requesting asynchronous service from a server, and handling its completion, involves messaging and inter-thread communication. Symbian platform provides efficient services to support these.