Replies: 1 comment
-
Found the correct usage here: https://github.com/bytebeamio/rumqtt/blob/main/rumqttc/examples/websocket.rs My mistake was to trust the port parameter, this is the correct way to do it: // port parameter is ignored when scheme is websocket
let mut mqttoptions = MqttOptions::new(
"clientId-aSziq39Bp3",
"ws://broker.mqttdashboard.com:8000/mqtt",
8000,
);
mqttoptions.set_transport(Transport::Ws);
mqttoptions.set_keep_alive(Duration::from_secs(60)); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The basic async example given in the docs doesn't seem to work with websockets.
Output:
test.mosquitto.org provides port
8080 : MQTT over WebSockets, unencrypted, unauthenticated
Is there something i am missing?
Beta Was this translation helpful? Give feedback.
All reactions