Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.
Talk:How to create a server from scratch
Featured article, November 29th 2009 (week 49)
11:55, 8 April 2008 (EEST) Perhaps you could add a sample demonstration of custom server security check to this example. That would make this example more complete.
Panics are to show programming errors during the course of development and not to indicate that an error happened due to e.g. lack of resources (which is not the programmer's fault). For proper error indication, one can use the Leave mechanism or, like in this case, simply return an error.10:04, 16 June 2008 (EEST) I would argue with that you should panic the server in case you encountered some problems. You know,
to Tote: article does not contain realization of PanicClient() or PanicServer() - you could add your own realization. Anyway it is a good subject for discussion - i.e. what to do if server could not start. IMHO article is nice and really useful.
Client-server architecture - is a key point for construction of complex, composite systems in Symbian OS. This article describes step by step instructions in creating classes for server application that is processing client requests in synchronous mode. The author demonstrates the use of base classes, such as CServer2, CSession2, RMessage2. Detailed comments help easily navigate in the code even the beginners. This code is well designed and conformed Symbian C++ naming convention.
This code example (as well as code example "Client side implementation of a server" by the same author ) convinient to use as a template for creating own application. But first of all it is necessary to understand how to construct client-server applications, what classes and why are necessary to use. The next step in studying of the client-server architectual approach is to create a server that works with asynchronous requests using active objects.
iServer in CSession2?
In your sample code refers to iServer from a CSession2 derived class. It has 2 problems:
1) iServer is already declared in CSession2 as "const CServer2* iServer" 2) It is private. So it would be good to rename it to something else (e.g. iMyServer).