TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
EncryptablePacket Class Reference

Public Member Functions

 EncryptablePacket (WorldPacket const &packet, bool encrypt)
 
bool NeedsEncryption () const
 
- Public Member Functions inherited from WorldPacket
 WorldPacket ()
 
 WorldPacket (uint32 opcode, size_t res=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
 
 WorldPacket (WorldPacket &&packet)
 
 WorldPacket (WorldPacket const &right)
 
WorldPacketoperator= (WorldPacket const &right)
 
WorldPacketoperator= (WorldPacket &&right)
 
 WorldPacket (uint32 opcode, MessageBuffer &&buffer, ConnectionType connection)
 
void Initialize (uint32 opcode, size_t newres=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
 
uint32 GetOpcode () const
 
void SetOpcode (uint32 opcode)
 
ConnectionType GetConnection () const
 
- Public Member Functions inherited from ByteBuffer
 ByteBuffer ()
 
 ByteBuffer (size_t reserve)
 
 ByteBuffer (ByteBuffer &&buf)
 
 ByteBuffer (ByteBuffer const &right)
 
 ByteBuffer (MessageBuffer &&buffer)
 
std::vector< uint8 > && Move ()
 
ByteBufferoperator= (ByteBuffer const &right)
 
ByteBufferoperator= (ByteBuffer &&right)
 
virtual ~ByteBuffer ()
 
void clear ()
 
template<typename T >
void append (T value)
 
void FlushBits ()
 
void ResetBitPos ()
 
bool WriteBit (uint32 bit)
 
bool ReadBit ()
 
template<typename T >
void WriteBits (T value, int32 bits)
 
uint32 ReadBits (int32 bits)
 
void ReadByteSeq (uint8 &b)
 
void WriteByteSeq (uint8 b)
 
template<typename T >
void put (size_t pos, T value)
 
template<>
void read_skip ()
 
template<>
void read_skip ()
 
template<typename T >
void PutBits (size_t pos, T value, uint32 bitCount)
 
ByteBufferoperator<< (uint8 value)
 
ByteBufferoperator<< (uint16 value)
 
ByteBufferoperator<< (uint32 value)
 
ByteBufferoperator<< (uint64 value)
 
ByteBufferoperator<< (int8 value)
 
ByteBufferoperator<< (int16 value)
 
ByteBufferoperator<< (int32 value)
 
ByteBufferoperator<< (int64 value)
 
ByteBufferoperator<< (float value)
 
ByteBufferoperator<< (double value)
 
ByteBufferoperator<< (const std::string &value)
 
ByteBufferoperator<< (const char *str)
 
ByteBufferoperator>> (bool &value)
 
ByteBufferoperator>> (uint8 &value)
 
ByteBufferoperator>> (uint16 &value)
 
ByteBufferoperator>> (uint32 &value)
 
ByteBufferoperator>> (uint64 &value)
 
ByteBufferoperator>> (int8 &value)
 
ByteBufferoperator>> (int16 &value)
 
ByteBufferoperator>> (int32 &value)
 
ByteBufferoperator>> (int64 &value)
 
ByteBufferoperator>> (float &value)
 
ByteBufferoperator>> (double &value)
 
ByteBufferoperator>> (std::string &value)
 
uint8operator[] (size_t const pos)
 
uint8 constoperator[] (size_t const pos) const
 
size_t rpos () const
 
size_t rpos (size_t rpos_)
 
void rfinish ()
 
size_t wpos () const
 
size_t wpos (size_t wpos_)
 
size_t bitwpos () const
 Returns position of last written bit. More...
 
size_t bitwpos (size_t newPos)
 
template<typename T >
void read_skip ()
 
void read_skip (size_t skip)
 
template<typename T >
read ()
 
template<typename T >
read (size_t pos) const
 
void read (uint8 *dest, size_t len)
 
void ReadPackedUInt64 (uint64 &guid)
 
void ReadPackedUInt64 (uint8 mask, uint64 &value)
 
std::string ReadString (uint32 length)
 
void WriteString (std::string const &str)
 
void WriteString (char const *str, size_t len)
 
uint32 ReadPackedTime ()
 
ByteBufferReadPackedTime (uint32 &time)
 
uint8contents ()
 
uint8 constcontents () const
 
size_t size () const
 
bool empty () const
 
void resize (size_t newsize)
 
void reserve (size_t ressize)
 
void append (const char *src, size_t cnt)
 
template<class T >
void append (const T *src, size_t cnt)
 
void append (const uint8 *src, size_t cnt)
 
void append (const ByteBuffer &buffer)
 
void appendPackXYZ (float x, float y, float z)
 
void AppendPackedUInt64 (uint64 guid)
 
void AppendPackedTime (time_t time)
 
void put (size_t pos, const uint8 *src, size_t cnt)
 
void print_storage () const
 
void textlike () const
 
void hexlike () const
 

Private Attributes

bool _encrypt
 

Additional Inherited Members

- Static Public Member Functions inherited from ByteBuffer
static size_t PackUInt64 (uint64 value, uint8 *mask, uint8 *result)
 
- Static Public Attributes inherited from ByteBuffer
static size_t const DEFAULT_SIZE = 0x1000
 
static uint8 const InitialBitPos = 8
 
- Protected Attributes inherited from WorldPacket
uint32 m_opcode
 
ConnectionType _connection
 
- Protected Attributes inherited from ByteBuffer
size_t _rpos
 
size_t _wpos
 
size_t _bitpos
 
uint8 _curbitval
 
std::vector< uint8_storage
 

Constructor & Destructor Documentation

EncryptablePacket::EncryptablePacket ( WorldPacket const packet,
bool  encrypt 
)
inline
47 : WorldPacket(packet), _encrypt(encrypt) { }
WorldPacket()
Definition: WorldPacket.h:30
bool _encrypt
Definition: WorldSocket.cpp:52

Member Function Documentation

bool EncryptablePacket::NeedsEncryption ( ) const
inline
49 { return _encrypt; }
bool _encrypt
Definition: WorldSocket.cpp:52

+ Here is the caller graph for this function:

Member Data Documentation

bool EncryptablePacket::_encrypt
private

The documentation for this class was generated from the following file: