Open 3D Engine AzNetworking API Reference
24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
Base class for all packets. More...
#include <IPacket.h>
Public Member Functions | |
AZ_TYPE_INFO (IPacket, "{1B33BFE8-8A4B-44E3-8C8D-3B924093227C}") | |
virtual PacketType | GetPacketType () const =0 |
virtual AZStd::unique_ptr< IPacket > | Clone () const =0 |
virtual bool | Serialize (ISerializer &serializer)=0 |
Base class for all packets.
IPacket defines an abstract interface that all packets transmitted using AzNetworking must conform to. While there are a number of core packets used internally by AzNetworking, it is fully possible for end-users to define their own custom packets using this interface. PacketType should be distinct, and should be greater than AzNetworking::CorePackets::MAX. The Serialize method allows the IPacket to be used by an ISerializer to move data between hosts safely and efficiently.
For more information on the packet format and best practices for extending the packet system, read Networking Packets on the O3DE documentation site.
|
pure virtual |
Returns an identical copy of the current packet instance, caller assumes ownership.
|
pure virtual |
Returns the packet type.
|
pure virtual |
Base serialize method for all serializable structures or classes to implement.
serializer | ISerializer instance to use for serialization |