1
0

update cmd client

This commit is contained in:
2026-01-08 19:37:25 +08:00
parent 64368b7837
commit 7b22dfb66b
13 changed files with 105 additions and 93 deletions

View File

@@ -5,23 +5,27 @@ namespace basalt::shared::deliver {
IDeliver::IDeliver() {}
IDeliver::~IDeliver() {}
IDeliver::~IDeliver() {
if (this->status != DeliverStatus::Stop) {
this->shutdown();
}
}
guid::Guid IDeliver::GetGuid() const {
guid::Guid IDeliver::get_guid() const {
throw std::logic_error("unimplemented function");
}
void IDeliver::Startup(DeliverConfig &&config) {
void IDeliver::startup(DeliverConfig &&config) {
if (this->status != DeliverStatus::Ready) throw std::runtime_error("unexpected deliver status");
this->config = std::move(config);
this->status = DeliverStatus::Running;
}
void IDeliver::Transmit() {
void IDeliver::transmit() {
if (this->status != DeliverStatus::Running) throw std::runtime_error("unexpected deliver status");
}
void IDeliver::Shutdown() {
void IDeliver::shutdown() {
if (this->status != DeliverStatus::Running) throw std::runtime_error("unexpected deliver status");
this->status = DeliverStatus::Stop;
}