mqtt-rs
mqtt-rs copied to clipboard
Example with tokio ?
Hello, can you please provide example with Tokio-core ?
If you want to work it with tokio, you have to parse packet in two steps:
-
Parse
FixedHeader -
And then, use the
remaining_lengthfield to get the remaining data. Parse the remaining one with Packet::decode_packet
Works exactly like this: https://github.com/zonyitoo/mqtt-rs/blob/master/src/packet/mod.rs#L221-L252