OpenTTD: Packet Struct Reference

OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions | Data Fields | Private Attributes
Packet Struct Reference

Internal entity of a packet. More...

`#include <packet.h>`

## Public Member Functions
| Packet (NetworkSocketHandler *cs)
| Create a packet that is used to read from a network socket.
| Packet (PacketType type)
| Creates a packet to send.
| ~Packet ()
| Free the buffer of this packet.
void | PrepareToSend ()
| Writes the packet size from the raw packet from packet->size.
void | Send_bool (bool data)
| Package a boolean in the packet.
void | Send_uint8 (uint8 data)
| Package a 8 bits integer in the packet.
void | Send_uint16 (uint16 data)
| Package a 16 bits integer in the packet.
void | Send_uint32 (uint32 data)
| Package a 32 bits integer in the packet.
void | Send_uint64 (uint64 data)
| Package a 64 bits integer in the packet.
void | Send_string (const char *data)
| Sends a string over the network.
void | ReadRawPacketSize ()
| Reads the packet size from the raw packet and stores it in the packet->size.
void | PrepareToRead ()
| Prepares the packet so it can be read.
bool | CanReadFromPacket (uint bytes_to_read)
| Is it safe to read from the packet, i.e.
bool | Recv_bool ()
| Read a boolean from the packet.
uint8 | Recv_uint8 ()
| Read a 8 bits integer from the packet.
uint16 | Recv_uint16 ()
| Read a 16 bits integer from the packet.
uint32 | Recv_uint32 ()
| Read a 32 bits integer from the packet.
uint64 | Recv_uint64 ()
| Read a 64 bits integer from the packet.
void | Recv_string (char *buffer, size_t size, StringValidationSettings settings=SVS_REPLACE_WITH_QUESTION_MARK)
| Reads a string till it finds a '\0' in the stream.

## Data Fields
Packet * | next
| The next packet.
PacketSize | size
| The size of the whole packet for received packets.
PacketSize | pos
| The current read/write position in the packet.
byte * | buffer
| The buffer of this packet, of basically variable length up to SEND_MTU.

## Private Attributes
NetworkSocketHandler * | cs
| Socket we're associated with.

## Detailed Description

Internal entity of a packet.

As everything is sent as a packet, all network communication will need to call the functions that populate the packet. Every packet can be at most SEND_MTU bytes. Overflowing this limit will give an assertion when sending (i.e. writing) the packet. Reading past the size of the packet when receiving will return all 0 values and "" in case of the string.

— Points of attention —

- all > 1 byte integral values are written in little endian, unless specified otherwise. Thus, 0x01234567 would be sent as {0x67, 0x45, 0x23, 0x01}.
- all sent strings are of variable length and terminated by a '\0'. Thus, the length of the strings is not sent.
- years that are leap years in the 'days since X' to 'date' calculations: (year % 4 == 0) and ((year % 100 != 0) or (year % 400 == 0))

Definition at line 44 of file packet.h.

## Constructor & Destructor Documentation

Packet::Packet | ( | NetworkSocketHandler * | cs | ) |

Create a packet that is used to read from a network socket.

Parameters

  cs | the socket handler associated with the socket we are reading from

Definition at line 27 of file packet.cpp.

References buffer, cs, next, pos, SEND_MTU, and size.

Packet::Packet | ( | PacketType | type | ) |

Creates a packet to send.

Parameters

  type | of the packet to send

Definition at line 42 of file packet.cpp.

References buffer, cs, next, pos, SEND_MTU, and size.

## Member Function Documentation

bool Packet::CanReadFromPacket | ( | uint | bytes_to_read | ) |

Is it safe to read from the packet, i.e.

didn't we run over the buffer ?

Parameters

  bytes_to_read | The amount of bytes we want to try to read.

Returns
  True if that is safe, otherwise false.

Definition at line 173 of file packet.cpp.

References cs, NetworkSocketHandler::HasClientQuit(), pos, and size.

Referenced by Recv_uint16(), Recv_uint32(), Recv_uint64(), and Recv_uint8().

bool Packet::Recv_bool | ( |  | ) |

Read a boolean from the packet.

Returns
  The read data.

Definition at line 212 of file packet.cpp.

References Recv_uint8().

Referenced by ClientNetworkGameSocketHandler::Receive_SERVER_CHAT(), ClientNetworkGameSocketHandler::Receive_SERVER_COMMAND(), ClientNetworkGameSocketHandler::Receive_SERVER_COMPANY_INFO(), and NetworkUDPSocketHandler::ReceiveNetworkGameInfo().

void Packet::Recv_string | ( | char * | buffer,
|  | size_t | size,
|  | StringValidationSettings | settings = `SVS_REPLACE_WITH_QUESTION_MARK`
| ) |  |

Reads a string till it finds a '\0' in the stream.

Parameters

  buffer | The buffer to put the data into.
  size | The size of the buffer.
  settings | The string validation settings.

Definition at line 290 of file packet.cpp.

References buffer, cs, NetworkSocketHandler::HasClientQuit(), pos, and str_validate().

Referenced by ServerNetworkAdminSocketHandler::Receive_ADMIN_CHAT(), ServerNetworkAdminSocketHandler::Receive_ADMIN_GAMESCRIPT(), ServerNetworkAdminSocketHandler::Receive_ADMIN_JOIN(), ServerNetworkAdminSocketHandler::Receive_ADMIN_RCON(), ServerNetworkGameSocketHandler::Receive_CLIENT_CHAT(), ServerNetworkGameSocketHandler::Receive_CLIENT_COMPANY_PASSWORD(), ServerNetworkGameSocketHandler::Receive_CLIENT_GAME_PASSWORD(), ServerNetworkGameSocketHandler::Receive_CLIENT_JOIN(), ServerNetworkGameSocketHandler::Receive_CLIENT_MOVE(), ServerNetworkGameSocketHandler::Receive_CLIENT_RCON(), ServerNetworkGameSocketHandler::Receive_CLIENT_SET_NAME(), ServerNetworkGameSocketHandler::Receive_CLIENT_SET_PASSWORD(), ClientNetworkGameSocketHandler::Receive_SERVER_CHAT(), ClientNetworkGameSocketHandler::Receive_SERVER_CLIENT_INFO(), ClientNetworkGameSocketHandler::Receive_SERVER_COMPANY_INFO(), ClientNetworkGameSocketHandler::Receive_SERVER_NEED_COMPANY_PASSWORD(), ClientNetworkUDPSocketHandler::Receive_SERVER_NEWGRFS(), ClientNetworkGameSocketHandler::Receive_SERVER_RCON(), ClientNetworkGameSocketHandler::Receive_SERVER_WELCOME(), NetworkGameSocketHandler::ReceiveCommand(), and NetworkUDPSocketHandler::ReceiveNetworkGameInfo().

uint16 Packet::Recv_uint16 | ( |  | ) |

Read a 16 bits integer from the packet.

Returns
  The read data.

Definition at line 235 of file packet.cpp.

References buffer, CanReadFromPacket(), and pos.

Referenced by ServerNetworkAdminSocketHandler::Receive_ADMIN_UPDATE_FREQUENCY(), ClientNetworkUDPSocketHandler::Receive_MASTER_RESPONSE_LIST(), ClientNetworkGameSocketHandler::Receive_SERVER_COMPANY_INFO(), ClientNetworkGameSocketHandler::Receive_SERVER_COMPANY_UPDATE(), ClientNetworkGameSocketHandler::Receive_SERVER_RCON(), and NetworkUDPSocketHandler::ReceiveNetworkGameInfo().

uint32 Packet::Recv_uint32 | ( |  | ) |

Read a 32 bits integer from the packet.

Returns
  The read data.

Definition at line 250 of file packet.cpp.

References buffer, CanReadFromPacket(), and pos.

Referenced by ServerNetworkAdminSocketHandler::Receive_ADMIN_CHAT(), ServerNetworkAdminSocketHandler::Receive_ADMIN_PING(), ServerNetworkAdminSocketHandler::Receive_ADMIN_POLL(), ServerNetworkGameSocketHandler::Receive_CLIENT_ACK(), ServerNetworkGameSocketHandler::Receive_CLIENT_CHAT(), ServerNetworkGameSocketHandler::Receive_CLIENT_JOIN(), ClientNetworkUDPSocketHandler::Receive_MASTER_RESPONSE_LIST(), ClientNetworkGameSocketHandler::Receive_SERVER_CHAT(), ClientNetworkGameSocketHandler::Receive_SERVER_CLIENT_INFO(), ClientNetworkGameSocketHandler::Receive_SERVER_COMMAND(), ClientNetworkGameSocketHandler::Receive_SERVER_COMPANY_INFO(), ClientNetworkGameSocketHandler::Receive_SERVER_ERROR_QUIT(), ClientNetworkGameSocketHandler::Receive_SERVER_FRAME(), ClientNetworkGameSocketHandler::Receive_SERVER_JOIN(), ClientNetworkGameSocketHandler::Receive_SERVER_MAP_BEGIN(), ClientNetworkGameSocketHandler::Receive_SERVER_MAP_SIZE(), ClientNetworkGameSocketHandler::Receive_SERVER_MOVE(), ClientNetworkGameSocketHandler::Receive_SERVER_NEED_COMPANY_PASSWORD(), ClientNetworkGameSocketHandler::Receive_SERVER_QUIT(), ClientNetworkGameSocketHandler::Receive_SERVER_SYNC(), ClientNetworkGameSocketHandler::Receive_SERVER_WELCOME(), NetworkGameSocketHandler::ReceiveCommand(), NetworkSocketHandler::ReceiveGRFIdentifier(), and NetworkUDPSocketHandler::ReceiveNetworkGameInfo().

uint64 Packet::Recv_uint64 | ( |  | ) |

Read a 64 bits integer from the packet.

Returns
  The read data.

Definition at line 267 of file packet.cpp.

References buffer, CanReadFromPacket(), and pos.

Referenced by ServerNetworkGameSocketHandler::Receive_CLIENT_CHAT(), MasterNetworkUDPSocketHandler::Receive_MASTER_SESSION_KEY(), ClientNetworkGameSocketHandler::Receive_SERVER_CHAT(), and ClientNetworkGameSocketHandler::Receive_SERVER_COMPANY_INFO().

uint8 Packet::Recv_uint8 | ( |  | ) |

Read a 8 bits integer from the packet.

Returns
  The read data.

Definition at line 221 of file packet.cpp.

References buffer, CanReadFromPacket(), and pos.

Referenced by NetworkContentSocketHandler::HandlePacket(), NetworkAdminSocketHandler::HandlePacket(), NetworkGameSocketHandler::HandlePacket(), NetworkUDPSocketHandler::HandleUDPPacket(), ServerNetworkAdminSocketHandler::Receive_ADMIN_CHAT(), ServerNetworkAdminSocketHandler::Receive_ADMIN_POLL(), ServerNetworkGameSocketHandler::Receive_CLIENT_ACK(), ServerNetworkGameSocketHandler::Receive_CLIENT_CHAT(), ServerNetworkGameSocketHandler::Receive_CLIENT_ERROR(), ServerNetworkUDPSocketHandler::Receive_CLIENT_GET_NEWGRFS(), ServerNetworkGameSocketHandler::Receive_CLIENT_JOIN(), ServerNetworkGameSocketHandler::Receive_CLIENT_MOVE(), ClientNetworkUDPSocketHandler::Receive_MASTER_RESPONSE_LIST(), ClientNetworkGameSocketHandler::Receive_SERVER_CHAT(), ClientNetworkGameSocketHandler::Receive_SERVER_CHECK_NEWGRFS(), ClientNetworkGameSocketHandler::Receive_SERVER_CLIENT_INFO(), ClientNetworkGameSocketHandler::Receive_SERVER_COMPANY_INFO(), ClientNetworkGameSocketHandler::Receive_SERVER_CONFIG_UPDATE(), ClientNetworkGameSocketHandler::Receive_SERVER_ERROR(), ClientNetworkGameSocketHandler::Receive_SERVER_ERROR_QUIT(), ClientNetworkGameSocketHandler::Receive_SERVER_FRAME(), ClientNetworkGameSocketHandler::Receive_SERVER_MOVE(), ClientNetworkUDPSocketHandler::Receive_SERVER_NEWGRFS(), ClientNetworkGameSocketHandler::Receive_SERVER_WAIT(), NetworkGameSocketHandler::ReceiveCommand(), NetworkSocketHandler::ReceiveGRFIdentifier(), NetworkUDPSocketHandler::ReceiveNetworkGameInfo(), and Recv_bool().

void Packet::Send_bool | ( | bool | data | ) |

Package a boolean in the packet.

Parameters

  data | The data to send.

Definition at line 91 of file packet.cpp.

References Send_uint8().

Referenced by ServerNetworkGameSocketHandler::SendChat(), ServerNetworkAdminSocketHandler::SendCmdNames(), ServerNetworkGameSocketHandler::SendCommand(), ServerNetworkGameSocketHandler::SendCompanyInfo(), ServerNetworkAdminSocketHandler::SendCompanyInfo(), NetworkSocketHandler::SendCompanyInformation(), ServerNetworkAdminSocketHandler::SendCompanyUpdate(), NetworkUDPSocketHandler::SendNetworkGameInfo(), ServerNetworkAdminSocketHandler::SendProtocol(), and ServerNetworkAdminSocketHandler::SendWelcome().

void Packet::Send_string | ( | const char * | data | ) |

Sends a string over the network.

It sends out the string + '\0'. No size-byte or something.

Parameters

  data | The string to send

Definition at line 152 of file packet.cpp.

References buffer, SEND_MTU, and size.

Referenced by NetworkUDPAdvertiseThread(), ServerNetworkUDPSocketHandler::Receive_CLIENT_GET_NEWGRFS(), ServerNetworkAdminSocketHandler::SendChat(), ClientNetworkGameSocketHandler::SendChat(), ServerNetworkGameSocketHandler::SendChat(), ServerNetworkAdminSocketHandler::SendClientInfo(), ServerNetworkGameSocketHandler::SendClientInfo(), ServerNetworkAdminSocketHandler::SendClientUpdate(), ServerNetworkAdminSocketHandler::SendCmdLogging(), ServerNetworkAdminSocketHandler::SendCmdNames(), NetworkGameSocketHandler::SendCommand(), ServerNetworkGameSocketHandler::SendCompanyInfo(), ServerNetworkAdminSocketHandler::SendCompanyInfo(), NetworkSocketHandler::SendCompanyInformation(), ClientNetworkGameSocketHandler::SendCompanyPassword(), ServerNetworkAdminSocketHandler::SendCompanyUpdate(), ServerNetworkAdminSocketHandler::SendConsole(), ClientNetworkGameSocketHandler::SendGamePassword(), ServerNetworkAdminSocketHandler::SendGameScript(), ClientNetworkGameSocketHandler::SendJoin(), ClientNetworkGameSocketHandler::SendMove(), ServerNetworkGameSocketHandler::SendNeedCompanyPassword(), NetworkUDPSocketHandler::SendNetworkGameInfo(), ServerNetworkAdminSocketHandler::SendRcon(), ClientNetworkGameSocketHandler::SendRCon(), ServerNetworkAdminSocketHandler::SendRconEnd(), ServerNetworkGameSocketHandler::SendRConResult(), ClientNetworkGameSocketHandler::SendSetName(), ClientNetworkGameSocketHandler::SendSetPassword(), ServerNetworkGameSocketHandler::SendWelcome(), and ServerNetworkAdminSocketHandler::SendWelcome().

void Packet::Send_uint16 | ( | uint16 | data | ) |

Package a 16 bits integer in the packet.

Parameters

  data | The data to send.

Definition at line 110 of file packet.cpp.

References buffer, GB(), SEND_MTU, and size.

Referenced by ClientNetworkContentSocketHandler::DownloadSelectedContentFallback(), NetworkUDPAdvertiseThread(), NetworkUDPRemoveAdvertiseThread(), ClientNetworkContentSocketHandler::RequestContentList(), ServerNetworkAdminSocketHandler::SendCmdLogging(), ServerNetworkAdminSocketHandler::SendCmdNames(), ServerNetworkAdminSocketHandler::SendCompanyEconomy(), NetworkSocketHandler::SendCompanyInformation(), ServerNetworkAdminSocketHandler::SendCompanyStats(), ServerNetworkGameSocketHandler::SendCompanyUpdate(), NetworkUDPSocketHandler::SendNetworkGameInfo(), ServerNetworkAdminSocketHandler::SendProtocol(), ServerNetworkAdminSocketHandler::SendRcon(), ServerNetworkGameSocketHandler::SendRConResult(), and ServerNetworkAdminSocketHandler::SendWelcome().

void Packet::Send_uint32 | ( | uint32 | data | ) |

Package a 32 bits integer in the packet.

Parameters

  data | The data to send.

Definition at line 121 of file packet.cpp.

References buffer, GB(), SEND_MTU, and size.

Referenced by ClientNetworkContentSocketHandler::DownloadSelectedContentFallback(), PacketWriter::Finish(), ClientNetworkContentSocketHandler::RequestContentList(), ClientNetworkGameSocketHandler::SendAck(), ServerNetworkAdminSocketHandler::SendChat(), ClientNetworkGameSocketHandler::SendChat(), ServerNetworkGameSocketHandler::SendChat(), ServerNetworkAdminSocketHandler::SendClientError(), ServerNetworkAdminSocketHandler::SendClientInfo(), ServerNetworkGameSocketHandler::SendClientInfo(), ServerNetworkAdminSocketHandler::SendClientJoin(), ServerNetworkAdminSocketHandler::SendClientQuit(), ServerNetworkAdminSocketHandler::SendClientUpdate(), ServerNetworkAdminSocketHandler::SendCmdLogging(), ServerNetworkGameSocketHandler::SendCommand(), NetworkGameSocketHandler::SendCommand(), ServerNetworkAdminSocketHandler::SendCompanyInfo(), NetworkSocketHandler::SendCompanyInformation(), ServerNetworkAdminSocketHandler::SendDate(), ServerNetworkGameSocketHandler::SendErrorQuit(), ServerNetworkGameSocketHandler::SendFrame(), NetworkSocketHandler::SendGRFIdentifier(), ClientNetworkGameSocketHandler::SendJoin(), ServerNetworkGameSocketHandler::SendJoin(), ServerNetworkGameSocketHandler::SendMap(), ServerNetworkGameSocketHandler::SendMove(), ServerNetworkGameSocketHandler::SendNeedCompanyPassword(), NetworkUDPSocketHandler::SendNetworkGameInfo(), ServerNetworkAdminSocketHandler::SendPong(), ServerNetworkGameSocketHandler::SendQuit(), ServerNetworkGameSocketHandler::SendSync(), ServerNetworkGameSocketHandler::SendWelcome(), and ServerNetworkAdminSocketHandler::SendWelcome().

void Packet::Send_uint64 | ( | uint64 | data | ) |

Package a 64 bits integer in the packet.

Parameters

  data | The data to send.

Definition at line 134 of file packet.cpp.

References buffer, GB(), SEND_MTU, and size.

Referenced by NetworkUDPAdvertiseThread(), ServerNetworkAdminSocketHandler::SendChat(), ClientNetworkGameSocketHandler::SendChat(), ServerNetworkGameSocketHandler::SendChat(), ServerNetworkAdminSocketHandler::SendCompanyEconomy(), and NetworkSocketHandler::SendCompanyInformation().

void Packet::Send_uint8 | ( | uint8 | data | ) |

Package a 8 bits integer in the packet.

Parameters

  data | The data to send.

Definition at line 100 of file packet.cpp.

References buffer, SEND_MTU, and size.

Referenced by NetworkUDPAdvertiseThread(), NetworkUDPQueryMasterServer(), NetworkUDPRemoveAdvertiseThread(), ServerNetworkUDPSocketHandler::Receive_CLIENT_DETAIL_INFO(), ServerNetworkUDPSocketHandler::Receive_CLIENT_GET_NEWGRFS(), ClientNetworkUDPSocketHandler::Receive_SERVER_RESPONSE(), ClientNetworkContentSocketHandler::RequestContentList(), Send_bool(), ClientNetworkGameSocketHandler::SendAck(), ServerNetworkAdminSocketHandler::SendChat(), ClientNetworkGameSocketHandler::SendChat(), ServerNetworkGameSocketHandler::SendChat(), ServerNetworkAdminSocketHandler::SendClientError(), ServerNetworkAdminSocketHandler::SendClientInfo(), ServerNetworkGameSocketHandler::SendClientInfo(), ServerNetworkAdminSocketHandler::SendClientUpdate(), ServerNetworkAdminSocketHandler::SendCmdLogging(), NetworkGameSocketHandler::SendCommand(), ServerNetworkAdminSocketHandler::SendCompanyEconomy(), ServerNetworkGameSocketHandler::SendCompanyInfo(), ServerNetworkAdminSocketHandler::SendCompanyInfo(), NetworkSocketHandler::SendCompanyInformation(), ServerNetworkAdminSocketHandler::SendCompanyNew(), ServerNetworkAdminSocketHandler::SendCompanyRemove(), ServerNetworkAdminSocketHandler::SendCompanyStats(), ServerNetworkAdminSocketHandler::SendCompanyUpdate(), ServerNetworkGameSocketHandler::SendConfigUpdate(), ServerNetworkAdminSocketHandler::SendError(), ClientNetworkGameSocketHandler::SendError(), ServerNetworkGameSocketHandler::SendError(), ServerNetworkGameSocketHandler::SendErrorQuit(), ServerNetworkGameSocketHandler::SendFrame(), NetworkSocketHandler::SendGRFIdentifier(), ClientNetworkGameSocketHandler::SendJoin(), ServerNetworkGameSocketHandler::SendMove(), ClientNetworkGameSocketHandler::SendMove(), NetworkUDPSocketHandler::SendNetworkGameInfo(), ServerNetworkGameSocketHandler::SendNewGRFCheck(), ServerNetworkAdminSocketHandler::SendProtocol(), ServerNetworkGameSocketHandler::SendWait(), and ServerNetworkAdminSocketHandler::SendWelcome().

## Field Documentation

byte* Packet::buffer

The buffer of this packet, of basically variable length up to SEND_MTU.

Definition at line 56 of file packet.h.

Referenced by TCPListenHandler< ServerNetworkGameSocketHandler, PACKET_SERVER_FULL, PACKET_SERVER_BANNED >::AcceptClient(), PacketReader::AddPacket(), Packet(), PrepareToSend(), ReadRawPacketSize(), NetworkTCPSocketHandler::ReceivePacket(), NetworkUDPSocketHandler::ReceivePackets(), Recv_string(), Recv_uint16(), Recv_uint32(), Recv_uint64(), Recv_uint8(), Send_string(), Send_uint16(), Send_uint32(), Send_uint64(), Send_uint8(), ServerNetworkGameSocketHandler::SendMap(), NetworkTCPSocketHandler::SendPacket(), NetworkUDPSocketHandler::SendPacket(), NetworkTCPSocketHandler::SendPackets(), PacketWriter::Write(), and ~Packet().

NetworkSocketHandler* Packet::cs
| private

Socket we're associated with.

Definition at line 60 of file packet.h.

Referenced by CanReadFromPacket(), Packet(), PrepareToSend(), ReadRawPacketSize(), and Recv_string().

Packet* Packet::next

The next packet.

Used for queueing packets before sending.

Definition at line 46 of file packet.h.

Referenced by PacketWriter::AppendQueue(), NetworkTCPSocketHandler::CloseConnection(), Packet(), PacketWriter::PopPacket(), PrepareToSend(), ReadRawPacketSize(), NetworkTCPSocketHandler::SendPacket(), NetworkTCPSocketHandler::SendPackets(), and PacketWriter::~PacketWriter().

PacketSize Packet::size

The size of the whole packet for received packets.

For packets that will be sent, the value is filled in just before the actual transmission.

Definition at line 52 of file packet.h.

Referenced by TCPListenHandler< ServerNetworkGameSocketHandler, PACKET_SERVER_FULL, PACKET_SERVER_BANNED >::AcceptClient(), PacketReader::AddPacket(), CanReadFromPacket(), Packet(), PrepareToSend(), ReadRawPacketSize(), ServerNetworkUDPSocketHandler::Receive_CLIENT_DETAIL_INFO(), ClientNetworkGameSocketHandler::Receive_SERVER_FRAME(), NetworkTCPSocketHandler::ReceivePacket(), ServerNetworkGameSocketHandler::ReceivePacket(), NetworkUDPSocketHandler::ReceivePackets(), Send_string(), Send_uint16(), Send_uint32(), Send_uint64(), Send_uint8(), ServerNetworkAdminSocketHandler::SendCmdNames(), NetworkTCPSocketHandler::SendPacket(), NetworkUDPSocketHandler::SendPacket(), NetworkTCPSocketHandler::SendPackets(), and PacketWriter::Write().

The documentation for this struct was generated from the following files:

- src/network/core/packet.h
- src/network/core/packet.cpp