19 m_data.reserve(preallocate);
24 m_data.reserve(preallocate);
42 const char *
getString(u32 from_offset)
const;
73 u16
getU16(u32 from_offset);
Definition networkpacket.h:14
const char * getRemainingString()
Definition networkpacket.h:38
void clear()
Definition networkpacket.cpp:39
std::string readLongString()
Definition networkpacket.cpp:188
u16 getU16(u32 from_offset)
Definition networkpacket.cpp:342
u32 getRemainingBytes() const
Definition networkpacket.h:37
void putRawPacket(const u8 *data, u32 datasize, session_t peer_id)
Definition networkpacket.cpp:21
void checkReadOffset(u32 from_offset, u32 field_size) const
Definition networkpacket.cpp:11
u16 m_command
Definition networkpacket.h:128
u32 m_read_offset
Definition networkpacket.h:127
void putRawString(std::string_view src)
Definition networkpacket.h:45
NetworkPacket & operator>>(std::string &dst)
Definition networkpacket.cpp:66
const char * getString(u32 from_offset) const
Definition networkpacket.cpp:48
Buffer< u8 > oldForgePacket()
Definition networkpacket.cpp:519
std::vector< u8 > m_data
Definition networkpacket.h:125
u32 m_datasize
Definition networkpacket.h:126
u32 getSize() const
Definition networkpacket.h:34
u8 getU8(u32 offset)
Definition networkpacket.cpp:314
void checkDataSize(u32 field_size)
Definition networkpacket.h:117
u8 * getU8Ptr(u32 offset)
Definition networkpacket.cpp:321
NetworkPacket(u16 command, u32 preallocate, session_t peer_id)
Definition networkpacket.h:16
NetworkPacket & operator<<(std::string_view src)
Definition networkpacket.cpp:87
void putRawString(const char *src, u32 len)
Definition networkpacket.cpp:55
u16 getCommand() const
Definition networkpacket.h:36
NetworkPacket(u16 command, u32 preallocate)
Definition networkpacket.h:21
void putLongString(std::string_view src)
Definition networkpacket.cpp:102
session_t m_peer_id
Definition networkpacket.h:129
session_t getPeerId() const
Definition networkpacket.h:35
core::vector2d< s32 > v2s32
Definition irr_v2d.h:13
core::vector2d< f32 > v2f
Definition irr_v2d.h:11
core::vector3d< s32 > v3s32
Definition irr_v3d.h:15
core::vector3d< s16 > v3s16
Definition irr_v3d.h:13
core::vector3df v3f
Definition irr_v3d.h:11
u16 session_t
Definition networkprotocol.h:22