Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Inter-thread data transfer

The client-server message protocol supports the passing of a 32-bit request code and four 32-bit parameters from client to server and returning a 32-bit result from the server to the client. The parameters may be interpreted as a TInt, TUint, TUint32 or any kind of pointer.

Simple server transactions can be handled by message passing alone but more complex transactions need more data and inter-thread data transfer is used. In this case, the client passes a pointer to a descriptor containing the data. The server then uses inter-thread read or write functions to transfer the data.

It is important to note that a server may not run until some arbitrary time after a client issues a request. Any descriptor containing data to be passed to the server must be guaranteed to exist until the request completes. For this reason, any such descriptor must not live on the program stack. Typically, such a descriptor would be a component of an object which is allocated on the heap.

The following diagram illustrates the idea.


See also

Descriptor concepts.