|
Wrath of Zeus
Made by Torchlight Games for CSE 125 SP24
|
#include <packet.hpp>
Public Member Functions | |
| ~PackagedPacket ()=default | |
| std::array< boost::asio::const_buffer, 2 > | toBuffer () |
Static Public Member Functions | |
| template<class Packet > | |
| static std::shared_ptr< PackagedPacket > | make_shared (PacketType type, Packet packet) |
A class which wraps around a packet that has yet to be sent across the network. Note: this class can only be instantiated as a shared_ptr using the provided friend helper function
|
default |
We explicitly make the destructor availabale.
|
inlinestatic |
Factory function that creates a smart pointer for the packaged packet.
| type | of packet to make |
| packet | actual packet data |
|
inline |
Converts the PackagedPacket into asio::buffer format.