publisher
-
MQTT(mosquitto) Visual studio - 2 (Publisher)Network 2021. 3. 8. 21:15
간단하게 Publish 할 수 있는 Client를 제작해 봅니다. #include #include #include #include #define sleep(x) Sleep((x)*1000) #define strdup _strdup #define DEFAULT_MQTT_HOST "127.0.0.1" #define DEFAULT_MQTT_PORT 1883 #define DEFAULT_MQTT_KEEPALIVE 60 #define DEFAULT_MQTT_TOPIC "EXAMPLE_TOPIC" #define BUF_LENGTH 65536 void connect_callback(struct mosquitto *mosq, void *obj, int result) { printf("connect callback, r..