|
|
| NetPacket () |
| | Constructs a NetPacket object by default.
|
| |
| | NetPacket (UInt16 netCode, std::size_t minCapacity=0) |
| | Constructs a NetPacket object with a packet number and a minimal capacity. More...
|
| |
| | NetPacket (UInt16 netCode, const void *ptr, std::size_t size) |
| | Constructs a NetPacket object with a packet number and raw memory. More...
|
| |
|
| NetPacket (const NetPacket &)=delete |
| |
| | NetPacket (NetPacket &&packet) |
| | Constructs a NetPacket object with another one by move semantic. More...
|
| |
|
| ~NetPacket () |
| | Destructs the object.
|
| |
| const UInt8 * | GetConstData () const |
| | Gets the raw buffer. More...
|
| |
| UInt8 * | GetData () const |
| | Gets the raw buffer. More...
|
| |
| size_t | GetDataSize () const |
| | Gets the size of the data. More...
|
| |
| UInt16 | GetNetCode () const |
| | Gets the packet number. More...
|
| |
| virtual void | OnReceive (UInt16 netCode, const void *data, std::size_t size) |
| | Operation to do when receiving data. More...
|
| |
| virtual const void * | OnSend (std::size_t *newSize) const |
| | Operation to do when sending data. More...
|
| |
|
void | Reset () |
| | Resets the packet.
|
| |
| void | Reset (UInt16 netCode, std::size_t minCapacity=0) |
| | Resets the packet with a packet number and a minimal capacity. More...
|
| |
| void | Reset (UInt16 netCode, const void *ptr, std::size_t size) |
| | Resets the packet with a packet number and raw memory. More...
|
| |
| void | Resize (std::size_t newSize) |
| | Resizes the packet. More...
|
| |
| void | SetNetCode (UInt16 netCode) |
| | Sets the packet number. More...
|
| |
|
NetPacket & | operator= (const NetPacket &)=delete |
| |
| NetPacket & | operator= (NetPacket &&packet) |
| | Moves the NetPacket into this. More...
|
| |
|
| ByteStream (Stream *stream=nullptr) |
| | Constructs a ByteStream object with a stream.
|
| |
| | ByteStream (ByteArray *byteArray, OpenModeFlags openMode=OpenMode_ReadWrite) |
| | Constructs a ByteStream object with a byte array. More...
|
| |
| | ByteStream (void *ptr, Nz::UInt64 size) |
| | Constructs a ByteStream object with a raw memory and a size. More...
|
| |
| | ByteStream (const void *ptr, Nz::UInt64 size) |
| | Constructs a ByteStream object with a raw memory and a size. More...
|
| |
|
| ByteStream (const ByteStream &)=delete |
| |
| | ByteStream (ByteStream &&stream) |
| | Constructs a ByteStream object by move semantic. More...
|
| |
| virtual | ~ByteStream () |
| | Destructs the object and calls FlushBits. More...
|
| |
| Endianness | GetDataEndianness () const |
| | Gets the stream endianness. More...
|
| |
| Nz::UInt64 | GetSize () const |
| | Gets the size of the byte stream. More...
|
| |
| Stream * | GetStream () const |
| | Gets the internal stream. More...
|
| |
| bool | FlushBits () |
| | Flushes the stream. More...
|
| |
| std::size_t | Read (void *ptr, std::size_t size) |
| | Reads data. More...
|
| |
| void | SetDataEndianness (Endianness endiannes) |
| | Sets the stream endianness. More...
|
| |
| void | SetStream (Stream *stream) |
| | Sets this with a stream. More...
|
| |
| void | SetStream (ByteArray *byteArray, OpenModeFlags openMode=OpenMode_ReadWrite) |
| | Sets this with a byte array. More...
|
| |
| void | SetStream (void *ptr, Nz::UInt64 size) |
| | Sets this with a raw memory and a size. More...
|
| |
| void | SetStream (const void *ptr, Nz::UInt64 size) |
| | Sets this with a raw memory and a size. More...
|
| |
| void | Write (const void *data, std::size_t size) |
| | Writes data. More...
|
| |
| template<typename T > |
| ByteStream & | operator>> (T &value) |
| | Outputs a data from the stream. More...
|
| |
| template<typename T > |
| ByteStream & | operator<< (const T &value) |
| | Adds the data to the stream. More...
|
| |
|
ByteStream & | operator= (const ByteStream &)=delete |
| |
| ByteStream & | operator= (ByteStream &&) |
| | Moves the other byte stream into this. More...
|
| |
Network class that represents a packet.