This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

What does poll function do in mqtt_simple sample program in nRF9160?

I have been studying MQTT these days.

I'm testing the program below.
https://github.com/NordicPlayground/fw-nrfconnect-nrf/blob/master/samples/nrf9160/mqtt_simple/src/main.c

In this sample program, poll function is used on line 370. I guess it waits for an incoming data for an assigned duration, CONFIG_MQTT_KEEPALIVE.

However, it does not wait at all even though no data comes. Why? I'm confused.

Parents Reply Children
No Data
Related