#include <packet.hpp>
Public Member Functions | |
| PacketProcessor () | |
| std::string | Decode (const std::string &) |
| std::string | Encode (const std::string &) |
| std::string | DickWinderE (const std::string &) |
| std::string | DickWinderD (const std::string &) |
| void | SetEMulti (unsigned char, unsigned char) |
Static Public Member Functions | |
| static std::string | GetFamilyName (unsigned char family) |
| Return a string describing a packet's family ID. | |
| static std::string | GetActionName (unsigned char action) |
| Return a string describing a packet's action ID. | |
| static std::string | DickWinder (const std::string &, unsigned char emulti) |
| static unsigned int | Number (unsigned char, unsigned char=254, unsigned char=254, unsigned char=254) |
| static util::quadchar | ENumber (unsigned int) |
| static util::quadchar | ENumber (unsigned int, std::size_t &size) |
| static unsigned short | PID (unsigned char family, unsigned char action) |
| static util::pairchar | EPID (unsigned short id) |
Static Public Attributes | |
| static const unsigned int | MAX1 = 253 |
| Highest number EO can represent with 1 byte. | |
| static const unsigned int | MAX2 = 64009 |
| Highest number EO can represent with 2 bytes. | |
| static const unsigned int | MAX3 = 16194277 |
| Highest number EO can represent with 3 bytes. | |
Protected Attributes | |
| unsigned int | emulti_e |
| "EMulti" variable for Encoding. | |
| unsigned int | emulti_d |
| "EMulti" variable for Decoding. | |
| bool | firstdec |
| Flag marking the first Decode call (which shouldn't be Decoded). | |
Each Client needs an instance of this because it holds connection-specific data required to function correctly.
| PacketProcessor::PacketProcessor | ( | ) |
| std::string PacketProcessor::GetFamilyName | ( | unsigned char | family | ) | [static] |
Return a string describing a packet's family ID.
| std::string PacketProcessor::GetActionName | ( | unsigned char | action | ) | [static] |
Return a string describing a packet's action ID.
| std::string PacketProcessor::Decode | ( | const std::string & | str | ) |
| std::string PacketProcessor::Encode | ( | const std::string & | rawstr | ) |
| std::string PacketProcessor::DickWinder | ( | const std::string & | str, | |
| unsigned char | emulti | |||
| ) | [static] |
| std::string PacketProcessor::DickWinderE | ( | const std::string & | str | ) |
| std::string PacketProcessor::DickWinderD | ( | const std::string & | str | ) |
| void PacketProcessor::SetEMulti | ( | unsigned char | emulti_e, | |
| unsigned char | emulti_d | |||
| ) |
| unsigned int PacketProcessor::Number | ( | unsigned char | b1, | |
| unsigned char | b2 = 254, |
|||
| unsigned char | b3 = 254, |
|||
| unsigned char | b4 = 254 | |||
| ) | [static] |
| util::quadchar PacketProcessor::ENumber | ( | unsigned int | number | ) | [static] |
| util::quadchar PacketProcessor::ENumber | ( | unsigned int | number, | |
| std::size_t & | size | |||
| ) | [static] |
| unsigned short PacketProcessor::PID | ( | unsigned char | family, | |
| unsigned char | action | |||
| ) | [static] |
| util::pairchar PacketProcessor::EPID | ( | unsigned short | id | ) | [static] |
unsigned int PacketProcessor::emulti_e [protected] |
"EMulti" variable for Encoding.
unsigned int PacketProcessor::emulti_d [protected] |
"EMulti" variable for Decoding.
bool PacketProcessor::firstdec [protected] |
Flag marking the first Decode call (which shouldn't be Decoded).
const unsigned int PacketProcessor::MAX1 = 253 [static] |
Highest number EO can represent with 1 byte.
const unsigned int PacketProcessor::MAX2 = 64009 [static] |
Highest number EO can represent with 2 bytes.
const unsigned int PacketProcessor::MAX3 = 16194277 [static] |
Highest number EO can represent with 3 bytes.
1.5.7.1