Thursday, May 31, 2007

Client Server Framework messages

When using Symbian OS's Client-Server-Framework there is something you have to keep in mind when working with messages (RMessage2):

If a client makes an asynchronous request to the server. The server signals completion on the RMessage2 instance (message 1) when he has finished the asynchronous request. For cancellation of this asynchronous request the client can send another request to the server (message 2). This completes immediately and forces the server to shutdown/cancel all its outstanding requests. After this has been done the server signals message 1 for completion. For making all this working the server has to store a copy of the message 1 and not a reference/pointer! By the way the type RMessage2 is a handle to a kernel side message instance.