Many services are based upon a client-server architecture. A client program uses services provided by a server.
The server defines a client interface API which the client uses to request specific services. The client and server programs run in different threads and so cannot directly access each other's address space. They use a message passing protocol to communicate.
All servers have a name which is passed to the server when it is started. A client finds a server through its name.
The channel of communication between a client and a server is known as a session. To make a server request, the client sends a message to the server over the session. The message includes a 32-bit request type code, and up to four 32-bit parameters. The server may use inter-thread data transfer services to send and receive additional data. When it has finished servicing the message, a 32-bit completion code is returned to the client. All client-server communication is mediated by the Kernel.
A session can be used by all threads in a process and not just by the thread that connected to the server. Such a session is said to be sharable.
A server must indicate that it can create sharable sessions. Default behaviour is always to create non-sharable sessions.
The Symbian platform itself provides several servers.
Note that in ER5:
The server name must be set up during construction of an instance
of a CServer
derived class.
There is no concept of sharable sessions. A session can only be used by the thread that connected to the server.