|
OpenTTD Source 20251116-master-g21329071df
|
Read some packets, and when do use that data as initial load filter. More...
Public Types | |
| using | Buffer = std::deque< uint8_t > |
| The underlying buffer type that's being use. | |
Public Member Functions | |
| PacketReader () | |
| Initialise everything. | |
| void | AddPacket (Packet &p) |
| Add a packet to this buffer. | |
| size_t | Read (uint8_t *rbuf, size_t size) override |
| Read a given number of bytes from the savegame. | |
| void | Reset () override |
| Reset this filter to read from the beginning of the file. | |
Public Member Functions inherited from LoadFilter | |
| LoadFilter (std::shared_ptr< LoadFilter > chain) | |
| Initialise this filter. | |
| virtual | ~LoadFilter ()=default |
| Make sure the writers are properly closed. | |
Data Fields | |
| Buffer | buffer |
| Buffer with the raw save game data. | |
| Buffer::const_iterator | iterator |
| Buffer we're going to write to/read from. | |
| size_t | read_bytes = 0 |
| The total number of read bytes. | |
Data Fields inherited from LoadFilter | |
| std::shared_ptr< LoadFilter > | chain |
| Chained to the (savegame) filters. | |
Read some packets, and when do use that data as initial load filter.
Definition at line 44 of file network_client.cpp.
| using PacketReader::Buffer = std::deque<uint8_t> |
The underlying buffer type that's being use.
Definition at line 45 of file network_client.cpp.
|
inline |
Initialise everything.
Definition at line 52 of file network_client.cpp.
|
inline |
Add a packet to this buffer.
| p | The packet to add. |
Definition at line 60 of file network_client.cpp.
References Packet::TransferOut().
|
inlineoverridevirtual |
Read a given number of bytes from the savegame.
| buf | The bytes to read. |
| len | The number of bytes to read. |
Implements LoadFilter.
Definition at line 69 of file network_client.cpp.
|
inlineoverridevirtual |
Reset this filter to read from the beginning of the file.
Reimplemented from LoadFilter.
Definition at line 81 of file network_client.cpp.
| Buffer PacketReader::buffer |
Buffer with the raw save game data.
Definition at line 47 of file network_client.cpp.
| Buffer::const_iterator PacketReader::iterator |
Buffer we're going to write to/read from.
Definition at line 48 of file network_client.cpp.
| size_t PacketReader::read_bytes = 0 |
The total number of read bytes.
Definition at line 49 of file network_client.cpp.