* Copy a sized byte buffer into the packet. * @param data The data to send. */
| 181 | * @param data The data to send. |
| 182 | */ |
| 183 | void Packet::Send_buffer(const std::vector<uint8_t> &data) |
| 184 | { |
| 185 | assert(this->CanWriteToPacket(sizeof(uint16_t) + data.size())); |
| 186 | this->Send_uint16((uint16_t)data.size()); |
| 187 | this->buffer.insert(this->buffer.end(), data.begin(), data.end()); |
| 188 | } |
| 189 | |
| 190 | /** |
| 191 | * Send as many of the bytes as possible in the packet. This can mean |
no test coverage detected