diff -r 000000000000 -r 89d6a7a84779 Symbian3/SDK/Source/GUID-1CC6FEF0-7D1E-5329-8276-22ACFE3DE362.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-1CC6FEF0-7D1E-5329-8276-22ACFE3DE362.dita Thu Jan 21 18:18:20 2010 +0000 @@ -0,0 +1,60 @@ + + + + + +Subsessions +within a sessionDescribes subsessions within a session. +

Once a client has established a session with a server, it can then establish +a number of subsessions with that server. Each subsession represents an independent +channel of communication within the current session.

+

Subsessions are useful if a single client needs to establish many channels +of communication with the server. This is because subsessions have a much +lower overhead than a full session. The main cost of a subsession is slightly +increased programming complexity on the server side.

+

The main points are:

+ +

As a subsession is always referenced by a handle on the client side, the +corresponding subsession object on the server side must generate a handle.

+

For ordinary sessions, the generation of handles is done by the server +framework.

+

For subsessions, server side code must be explicitly written to do this. +The CObject class and its associated container (CObjectCon) +and index (CObjectIx) classes provide the behaviour to achieve +this.

+
Server side requirements

Each subsession is represented +by an instance of a CObject derived class.

Subsession +objects must be held in an object container, an instance of CObjectCon. +This means that the server 's CServer2 derived class must +construct and maintain a CObjectCon object.

Object +containers are constructed by and held in an object container index, an instance +of a CObjectConIx. This means that the server 's CServer2 derived +class must construct and maintain a CObjectConIx object.

A +unique handle number for a subsession object is generated when the subsession +object is added to an object index, an instance of a CObjectIx. +This means that the server's CServer2 derived class must +construct and maintain a CObjectIx object.

The handle +number is a combination of a unique id assigned to the object's container +and a number generated by the object index.

+ +

Subsession within a session

+
+
Note
    +
  • Depending on the purpose +of the server, more than one object container (a CObjectCon) +and more than one object index (a CObjectIx) may be used. +However, the server must have one and only one object container index +(a CObjectConIx) from which all object containers are generated.

  • +
+
\ No newline at end of file