|
xale-db 1.0
minimal SQL engine, written in c++
|
Represents a network packet for communication in Xale DB. More...
#include <Packet.h>


Public Member Functions | |
| Packet (CommandType cmd, std::vector< uint8_t > data, std::vector< uint8_t > tokenData={}) | |
| Constructs a Packet with command, payload, and optional token. | |
| std::vector< uint8_t > | serialize () const override |
| Serializes the packet to a byte vector. | |
| void | deserialize (const std::vector< uint8_t > &buffer) override |
| Deserializes the packet from a byte vector. | |
| uint32_t | size () const override |
| Gets the total size of the packet in bytes. | |
| const std::vector< uint8_t > | getPayload () const |
| Gets the payload data of the packet. | |
| Public Member Functions inherited from Xale::Net::IPacket | |
| virtual | ~IPacket ()=default |
Represents a network packet for communication in Xale DB.
| Xale::Net::Packet::Packet | ( | CommandType | cmd, |
| std::vector< uint8_t > | data, | ||
| std::vector< uint8_t > | tokenData = {} ) |
Constructs a Packet with command, payload, and optional token.
Constructs a Packet with command, payload, and optional token (token ignored for now).
| cmd | Command type |
| data | Payload data |
| tokenData | Optional authentication token |
| cmd | Command type |
| data | Payload data |
| tokenData | Optional authentication token (ignored) |
|
overridevirtual |
Deserializes the packet from a byte vector.
Deserializes the packet from a byte vector (no token support for now).
| buffer | Byte vector containing serialized packet |
Implements Xale::Net::IPacket.
| const std::vector< uint8_t > Xale::Net::Packet::getPayload | ( | ) | const |
Gets the payload data of the packet.
|
overridevirtual |
Serializes the packet to a byte vector.
Serializes the packet to a byte vector (no token support for now).
Implements Xale::Net::IPacket.
|
overridevirtual |
Gets the total size of the packet in bytes.
Gets the total size of the packet in bytes (no token).
Implements Xale::Net::IPacket.