Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]


Introduction to the client-server architecture

[Top]


Why use a server?

It is usually appropriate to provide services through a server:

Most servers are motivated by a combination of requirements such as these.

There are three distinct aspects to the service provided by a server:

[Top]


Symbian OS client/server

In Symbian OS, the server defines a client interface API which the client uses to request specific services. The client and server programs run in different threads, often in different processes, 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 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 an also be shared by all threads across all processes, 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 support sharable sessions. Default behaviour is always to create non-sharable sessions.

Symbian OS itself provides several servers.