This code based on ESP8266 port of the embedded C client in Eclipse Paho project (http://www.eclipse.org/paho/) and it port for espressif ESP8266_RTOS_SDK by baoshi (https://github.com/baoshi/ESP-RTOS-Paho.git)