Client first

This commit is contained in:
Ondrej Babec
2022-02-25 09:31:16 +01:00
parent 477cd49d66
commit 1918930761
10 changed files with 232 additions and 38 deletions

20
src/client/client_v5.rs Normal file
View File

@@ -0,0 +1,20 @@
use crate::packet::publish_packet::PublishPacket;
use crate::network::network_trait::Network;
struct MqttClientV5<T: Network> {
network_driver: T,
}
impl<T> MqttClientV5<T>
where
T: Network,
{
fn send_message(& mut self, topic_name: & str, message: & str, buffer: & mut [u8]) {
let packet = PublishPacket::new(topic_name, message);
self.network_driver.send()
}
fn receive_message(& mut self) {
}
}

1
src/client/mod.rs Normal file
View File

@@ -0,0 +1 @@
pub mod client_v5;