Introduction Manual Class Reference Header Reference



Bitstreams are Zoidcom's basic communication primitive. All data you send or receive will be packed into an instance of the ZCom_BitStream class, either by you or by Zoidcom. This enables Zoidcom to save bandwidth on the bit level, from packet headers to replication meta data.

Packet vs Message

A packet is a bundled array of data that is sent over the network, and contains one or more messages. Packets are sent at a fixed rate, depending on the connection quality.

A message is a piece of information that needs to get from one host to another. That includes data from replicators, messages sent by the application, internal control messages and more. Zoidcom will serialize as much messages as it can into each packet, and the amount of messages a program generates does not influence Zoidcom's packet rate. Actually, Zoidcom is designed to work the other way around: The available packet rate influences how many messages the program will generate.

Memory Management

The application is responsible for deleting almost all Zoidcom objects it has created. Make sure to delete them in the correct order, that is all ZCom_Node before ZCom_Control and everything else before ZoidCom.

ZCom_BitStream objects that have been passed to any of Zoidcom's methods will be deleted by Zoidcom automatically. ZCom_BitStream objects that have been created but not given to any Zoidcom method, need to be deleted by the application.

In some methods an object can be given to Zoidcom with the possibility to set an autodelete flag. In these cases, Zoidcom will take care of deleting it after use. If autodelete is used, the object goes into possession of Zoidcom and may not be deleted manually anymore.

If an assert occurs while deleting a Zoidcom object, it is likely that the about to be deleted object is in Zoidcom's ownership, and therefore should not be deleted.

This file is part of the documentation for Zoidcom. Documentation copyright © 2004-2008 by Jörg Rüppel. Generated on Sat Aug 16 15:26:51 2008 for Zoidcom by doxygen 1.4.6-NO