|
R-Type
Distributed multiplayer game engine in C++
|
Interface representing a network packet. More...
#include <IPacket.hpp>


Public Member Functions | |
| virtual | ~IPacket ()=default |
| virtual const std::vector< uint8_t > & | getData () const =0 |
| Get the packet data as a byte buffer. | |
| virtual size_t | getSize () const =0 |
| Get the size of the packet data in bytes. | |
| virtual uint32_t | getFlags () const =0 |
| Get the flags associated with this packet. | |
| virtual void | setData (const std::vector< uint8_t > &data)=0 |
| Set new data for this packet. | |
Interface representing a network packet.
IPacket encapsulates data to be sent or received over the network. The concrete implementation (ENet, custom UDP, etc.) is hidden behind this interface so the backend can be swapped without impacting game code.
Definition at line 35 of file IPacket.hpp.
|
virtualdefault |
|
pure virtual |
Get the packet data as a byte buffer.
Implemented in ENetPacketWrapper.
|
pure virtual |
|
pure virtual |
Get the size of the packet data in bytes.
Implemented in ENetPacketWrapper.
|
pure virtual |