[api] Eliminate rx_buf heap churn and release buffers after initial sync (#12133)

This commit is contained in:
J. Nick Koston
2025-11-28 12:13:29 -06:00
committed by GitHub
parent 26e979d3d5
commit fb82362e9c
9 changed files with 44 additions and 22 deletions
@@ -407,8 +407,7 @@ APIError APINoiseFrameHelper::read_packet(ReadPacketBuffer *buffer) {
return APIError::BAD_DATA_PACKET;
}
buffer->container = std::move(this->rx_buf_);
buffer->data_offset = 4;
buffer->data = msg_data + 4; // Skip 4-byte header (type + length)
buffer->data_len = data_len;
buffer->type = type;
return APIError::OK;