User Tools

Site Tools


ipacketserializationstrategy

IPacketSerializationStrategy

This interface defines the serialization contract used to convert an Component into packet data and to apply serialized packet data back onto an existing Component.

Packet serialization strategies are implemented for specific Component and packet types. A Component is only included in Entity serialization when a corresponding serialization strategy exists for it. Components without a serialization strategy are ignored during serialization. Components empty of data (used as tags or identifiers) or containing data not meant to serialize do not necessitate the creation of a corresponding strategy. Components already existing in the core architecture already have registered strategies where applicable.

Methods

Method MessageBase SerializeComponent(IComponent component)
Description Serializes specified Component into its corresponding packet representation and returns the resulting MessageBase.
Method bool DeserializeComponent(IComponent component, NetDataReader reader)
Description Deserializes Component data from specified NetDataReader and applies it to the supplied Component. Returns true if deserialization completes successfully and false if the Component could not be deserialized.
ipacketserializationstrategy.txt · Last modified: by diviner

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki