* Sends a string over the network. It sends out * the string + '\0'. No size-byte or something. * @param data The string to send */
| 170 | * @param data The string to send |
| 171 | */ |
| 172 | void Packet::Send_string(std::string_view data) |
| 173 | { |
| 174 | assert(this->CanWriteToPacket(data.size() + 1)); |
| 175 | this->buffer.insert(this->buffer.end(), data.begin(), data.end()); |
| 176 | this->buffer.emplace_back('\0'); |
| 177 | } |
| 178 | |
| 179 | /** |
| 180 | * Copy a sized byte buffer into the packet. |
no test coverage detected