// SPDX-License-Identifier: BSD-3-Clause #include "client.h" namespace protocol { void BaseClient::setDevice(std::shared_ptr device) { device_ = std::move(device); } std::pair, size_t> BaseClient::runOnDevice(std::string& raw) { size_t bufSize = 256; std::shared_ptr buf(new char[bufSize]); size_t responseSize = device_->run( (const u8*)raw.c_str(), raw.size(), (u8*)buf.get(), bufSize); return std::pair, size_t>(buf, responseSize); } }