Syndim / actix-mqtt-client

A rust MQTT v3.1.1 client based on the actix framework
MIT License
14 stars 3 forks source link

support MQTT over websocket #10

Closed xudesheng closed 4 years ago

xudesheng commented 4 years ago

Hi, @Syndim 👍 so far, this lib works great. really appreciate.

do you have plan to support MQTT over websocket? 
Syndim commented 4 years ago

Hi @xudesheng, this library itself doesn't depend on any underlying protocol. As long as you can create something which implements tokio::io::AsyncRead and tokio::io::AsyncWrite and pass it to the client it should work out of the box.

I'm not familiar with MQTT over websocket but I did a quick search and it looks this library: https://docs.rs/tokio-tungstenite/ can create a websocket stream and maybe can be used.

xudesheng commented 4 years ago

Hi @xudesheng, this library itself doesn't depend on any underlying protocol. As long as you can create something which implements tokio::io::AsyncRead and tokio::io::AsyncWrite and pass it to the client it should work out of the box.

I'm not familiar with MQTT over websocket but I did a quick search and it looks this library: https://docs.rs/tokio-tungstenite/ can create a websocket stream and maybe can be used.

Thank you! this lib looks great. I will try to work on it when I have bandwidth.