Freeze level: same session

With kSameSession, you know that objects you are streaming will only be restored on your own machine. Objects streamed out with kSameSession can only be restored inside a program or task before you reboot or turn off your computer. For example, instances of TToken can assume that their server will still be around as long as your machine is not shut down. This makes it possible for TToken objects to stream IDs (integers) instead of the full text associated with each token. If you know that your objects are bitwise copyable and you are using either a kSameSession or a kSameTeam freeze level, you can improve performance by calling the ::Write member function with the following prototype.

        Write(void* object, size_t count)
Write is defined for all subclasses of TStream.

CAUTION This optimization may not be portable and should be used to improve performance only if you have a clear understanding of the way bitwise copy will behave on all target machines.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker