diff --git a/README.md b/README.md index 186191c..3f52135 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ fn setup_clients(mut commands: Commands) { cap: 10, }); + // spawn websocket client let mut mqtt_options = MqttOptions::new("mqtt-ws-client", "ws://127.0.0.1:8080", 8080); mqtt_options.set_transport(Transport::Ws); // mqtt_options.set_credentials("username", "password"); @@ -56,6 +57,7 @@ fn setup_clients(mut commands: Commands) { )); } +// just a marker component for filter #[derive(Component)] struct WebsocketMqttClient; @@ -140,10 +142,10 @@ fn publish_message(mqtt_client: Query<&MqttClient, With>) { ## Supported Versions -| bevy | bevy_mqtt | -|------|-----------| -| 0.14 | 0.2, 0.3 | -| 0.13 | 0.1 | +| bevy | bevy_mqtt | +|------|---------------| +| 0.14 | 0.2, 0.3, 0.4 | +| 0.13 | 0.1 | ## License diff --git a/examples/pub_and_sub.rs b/examples/pub_and_sub.rs index fde1929..561c23c 100644 --- a/examples/pub_and_sub.rs +++ b/examples/pub_and_sub.rs @@ -25,6 +25,7 @@ fn setup_clients(mut commands: Commands) { cap: 10, }); + // spawn websocket client let mut mqtt_options = MqttOptions::new("mqtt-ws-client", "ws://127.0.0.1:8080", 8080); mqtt_options.set_transport(Transport::Ws); // mqtt_options.set_credentials("username", "password"); @@ -39,6 +40,7 @@ fn setup_clients(mut commands: Commands) { )); } +// just a marker component for filter #[derive(Component)] struct WebsocketMqttClient;