Client Server Example Code

Example code that explains how to use client server framework.

Simple client server example

Description

This pair of examples shows a simple use of the client server interface. The client, SimpleClient, has a single session with the server SimpleServer, implemented as a statically linked DLL.

Download

Click on the following link to download the example: ClientServerSimple.zip

Click the following link to download additional files: CommonFramework.zip

Click browse ClientServerSimple to view the example

Click browse CommonFramework to view additional files.

SimpleClient: simple client

Build Notes

The server must be built before the client. This requirement is specified in the component description file, bld.inf. SimpleServer.mmp is listed before SimpleClient.mmp. Build activities relating to particular .mmp files are carried out in the order in which they are listed in the bld.inf file.

Class summary

RSessionBase CServer2 CSession2

Complex client server example

This pair of examples shows a more complex use of the client server interface. The server can support multiple subsessions within a single session, represented by the code in ComplexServer***; ComplexClient*** is the corresponding client code.

Download

Click on the following link to download the example: ClientServerComplex.zip

Click the following link to download additional files: CommonFramework.zip

Click browse ClientServerComplex to view example.

Click browse CommonFramework to view additional files.

ComplexClient: client requiring multiple server subsessions

Build Notes

The server must be built before the client. This requirement is specified in the component description file bld.inf. ComplexServer.mmp is listed before ComplexClient.mmp. Build activities relating to particular .mmp files are carried out in the order in which they are listed in the bld.inf file.

Class summary

RSessionBase RSubSessionBase CServer2 CSession2 CObject CObjectCon CObjectConIx

Security issues

The example does not demonstrate security issues. Its purpose is just to demonstrate the mechanics of the client server relationship.