From ba8bb4466108ad4d581a3375cf73e208d0cf2472 Mon Sep 17 00:00:00 2001 From: PK Chan Date: Tue, 10 Mar 2020 18:09:51 +0800 Subject: [PATCH] samples: net: mqtt_publisher: demo for ping request and response Once the MQTT ping response has been received from the server, the application is then notified with the MQTT_EVT_PINGRESP event. Signed-off-by: PK Chan --- samples/net/mqtt_publisher/src/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/samples/net/mqtt_publisher/src/main.c b/samples/net/mqtt_publisher/src/main.c index 7bd5ff21283..ea54b4ef41b 100644 --- a/samples/net/mqtt_publisher/src/main.c +++ b/samples/net/mqtt_publisher/src/main.c @@ -192,6 +192,10 @@ void mqtt_evt_handler(struct mqtt_client *const client, break; + case MQTT_EVT_PINGRESP: + LOG_INF("PINGRESP packet"); + break; + default: break; }