Custom scope
This commit is contained in:
parent
5729feef15
commit
a862637a77
|
@ -34,16 +34,18 @@ where
|
||||||
self.network_driver.send(self.buffer, len).await ?;
|
self.network_driver.send(self.buffer, len).await ?;
|
||||||
|
|
||||||
//connack
|
//connack
|
||||||
let connack = {
|
{
|
||||||
self.receive().await ?;
|
self.receive().await ?;
|
||||||
let mut packet = ConnackPacket::new();
|
let mut packet = ConnackPacket::<5>::new();
|
||||||
packet.decode(&mut BuffReader::new(self.buffer));
|
packet.decode(&mut BuffReader::new(self.buffer));
|
||||||
packet
|
|
||||||
|
|
||||||
|
if packet.connect_reason_code != 0x00 {
|
||||||
|
todo!();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if connack.connect_reason_code != 0x00 {
|
|
||||||
todo!();
|
|
||||||
}
|
|
||||||
|
|
||||||
// publish
|
// publish
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ use rust_mqtt::packet::subscription_packet::SubscriptionPacket;
|
||||||
use rust_mqtt::tokio_network::TokioNetwork;
|
use rust_mqtt::tokio_network::TokioNetwork;
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
fn main() {
|
async fn main() {
|
||||||
env_logger::builder()
|
env_logger::builder()
|
||||||
.filter_level(log::LevelFilter::Info)
|
.filter_level(log::LevelFilter::Info)
|
||||||
.format_timestamp_nanos()
|
.format_timestamp_nanos()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user