Custom scope

This commit is contained in:
Ondrej Babec
2022-02-25 16:49:48 +01:00
parent 5729feef15
commit a862637a77
2 changed files with 9 additions and 7 deletions

View File

@@ -34,16 +34,18 @@ where
self.network_driver.send(self.buffer, len).await ?;
//connack
let connack = {
{
self.receive().await ?;
let mut packet = ConnackPacket::new();
let mut packet = ConnackPacket::<5>::new();
packet.decode(&mut BuffReader::new(self.buffer));
packet
if packet.connect_reason_code != 0x00 {
todo!();
}
};
if connack.connect_reason_code != 0x00 {
todo!();
}
// publish