首页 星云 工具 资源 星选 资讯 热门工具
:

PDF转图片 完全免费 小红书视频下载 无水印 抖音视频下载 无水印 数字星空

windows MQTT mosquitto2.0.18a安装包

后端 2.39MB 28 需要积分: 1
立即下载

资源介绍:

用于windows c++ 连接MQTT
/* Copyright (c) 2010-2020 Roger Light All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 and Eclipse Distribution License v1.0 which accompany this distribution. The Eclipse Public License is available at https://www.eclipse.org/legal/epl-2.0/ and the Eclipse Distribution License is available at http://www.eclipse.org/org/documents/edl-v10.php. SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause Contributors: Roger Light - initial implementation and documentation. */ #ifndef MOSQUITTO_H #define MOSQUITTO_H /* * File: mosquitto.h * * This header contains functions and definitions for use with libmosquitto, the Mosquitto client library. * * The definitions are also used in Mosquitto broker plugins, and some functions are available to plugins. */ #ifdef __cplusplus extern "C" { #endif #ifdef WIN32 # ifdef mosquitto_EXPORTS # define libmosq_EXPORT __declspec(dllexport) # else # ifndef LIBMOSQUITTO_STATIC # ifdef libmosquitto_EXPORTS # define libmosq_EXPORT __declspec(dllexport) # else # define libmosq_EXPORT __declspec(dllimport) # endif # else # define libmosq_EXPORT # endif # endif #else # define libmosq_EXPORT #endif #if defined(_MSC_VER) && _MSC_VER < 1900 && !defined(bool) # ifndef __cplusplus # define bool char # define true 1 # define false 0 # endif #else # ifndef __cplusplus # include # endif #endif #include #include #define LIBMOSQUITTO_MAJOR 2 #define LIBMOSQUITTO_MINOR 0 #define LIBMOSQUITTO_REVISION 18 /* LIBMOSQUITTO_VERSION_NUMBER looks like 1002001 for e.g. version 1.2.1. */ #define LIBMOSQUITTO_VERSION_NUMBER (LIBMOSQUITTO_MAJOR*1000000+LIBMOSQUITTO_MINOR*1000+LIBMOSQUITTO_REVISION) /* Log types */ #define MOSQ_LOG_NONE 0 #define MOSQ_LOG_INFO (1<<0) #define MOSQ_LOG_NOTICE (1<<1) #define MOSQ_LOG_WARNING (1<<2) #define MOSQ_LOG_ERR (1<<3) #define MOSQ_LOG_DEBUG (1<<4) #define MOSQ_LOG_SUBSCRIBE (1<<5) #define MOSQ_LOG_UNSUBSCRIBE (1<<6) #define MOSQ_LOG_WEBSOCKETS (1<<7) #define MOSQ_LOG_INTERNAL 0x80000000U #define MOSQ_LOG_ALL 0xFFFFFFFFU /* Enum: mosq_err_t * Integer values returned from many libmosquitto functions. */ enum mosq_err_t { MOSQ_ERR_AUTH_CONTINUE = -4, MOSQ_ERR_NO_SUBSCRIBERS = -3, MOSQ_ERR_SUB_EXISTS = -2, MOSQ_ERR_CONN_PENDING = -1, MOSQ_ERR_SUCCESS = 0, MOSQ_ERR_NOMEM = 1, MOSQ_ERR_PROTOCOL = 2, MOSQ_ERR_INVAL = 3, MOSQ_ERR_NO_CONN = 4, MOSQ_ERR_CONN_REFUSED = 5, MOSQ_ERR_NOT_FOUND = 6, MOSQ_ERR_CONN_LOST = 7, MOSQ_ERR_TLS = 8, MOSQ_ERR_PAYLOAD_SIZE = 9, MOSQ_ERR_NOT_SUPPORTED = 10, MOSQ_ERR_AUTH = 11, MOSQ_ERR_ACL_DENIED = 12, MOSQ_ERR_UNKNOWN = 13, MOSQ_ERR_ERRNO = 14, MOSQ_ERR_EAI = 15, MOSQ_ERR_PROXY = 16, MOSQ_ERR_PLUGIN_DEFER = 17, MOSQ_ERR_MALFORMED_UTF8 = 18, MOSQ_ERR_KEEPALIVE = 19, MOSQ_ERR_LOOKUP = 20, MOSQ_ERR_MALFORMED_PACKET = 21, MOSQ_ERR_DUPLICATE_PROPERTY = 22, MOSQ_ERR_TLS_HANDSHAKE = 23, MOSQ_ERR_QOS_NOT_SUPPORTED = 24, MOSQ_ERR_OVERSIZE_PACKET = 25, MOSQ_ERR_OCSP = 26, MOSQ_ERR_TIMEOUT = 27, MOSQ_ERR_RETAIN_NOT_SUPPORTED = 28, MOSQ_ERR_TOPIC_ALIAS_INVALID = 29, MOSQ_ERR_ADMINISTRATIVE_ACTION = 30, MOSQ_ERR_ALREADY_EXISTS = 31, }; /* Enum: mosq_opt_t * * Client options. * * See , , and . */ enum mosq_opt_t { MOSQ_OPT_PROTOCOL_VERSION = 1, MOSQ_OPT_SSL_CTX = 2, MOSQ_OPT_SSL_CTX_WITH_DEFAULTS = 3, MOSQ_OPT_RECEIVE_MAXIMUM = 4, MOSQ_OPT_SEND_MAXIMUM = 5, MOSQ_OPT_TLS_KEYFORM = 6, MOSQ_OPT_TLS_ENGINE = 7, MOSQ_OPT_TLS_ENGINE_KPASS_SHA1 = 8, MOSQ_OPT_TLS_OCSP_REQUIRED = 9, MOSQ_OPT_TLS_ALPN = 10, MOSQ_OPT_TCP_NODELAY = 11, MOSQ_OPT_BIND_ADDRESS = 12, MOSQ_OPT_TLS_USE_OS_CERTS = 13, }; /* MQTT specification restricts client ids to a maximum of 23 characters */ #define MOSQ_MQTT_ID_MAX_LENGTH 23 #define MQTT_PROTOCOL_V31 3 #define MQTT_PROTOCOL_V311 4 #define MQTT_PROTOCOL_V5 5 /* Struct: mosquitto_message * * Contains details of a PUBLISH message. * * int mid - the message/packet ID of the PUBLISH message, assuming this is a * QoS 1 or 2 message. Will be set to 0 for QoS 0 messages. * * char *topic - the topic the message was delivered on. * * void *payload - the message payload. This will be payloadlen bytes long, and * may be NULL if a zero length payload was sent. * * int payloadlen - the length of the payload, in bytes. * * int qos - the quality of service of the message, 0, 1, or 2. * * bool retain - set to true for stale retained messages. */ struct mosquitto_message{ int mid; char *topic; void *payload; int payloadlen; int qos; bool retain; }; struct mosquitto; typedef struct mqtt5__property mosquitto_property; /* * Topic: Threads * libmosquitto provides thread safe operation, with the exception of * which is not thread safe. * * If the library has been compiled without thread support it is *not* * guaranteed to be thread safe. * * If your application uses threads you must use to * tell the library this is the case, otherwise it makes some optimisations * for the single threaded case that may result in unexpected behaviour for * the multi threaded case. */ /*************************************************** * Important note * * The following functions that deal with network operations will return * MOSQ_ERR_SUCCESS on success, but this does not mean that the operation has * taken place. An attempt will be made to write the network data, but if the * socket is not available for writing at that time then the packet will not be * sent. To ensure the packet is sent, call mosquitto_loop() (which must also * be called to process incoming network data). * This is especially important when disconnecting a client that has a will. If * the broker does not receive the DISCONNECT command, it will assume that the * client has disconnected unexpectedly and send the will. * * mosquitto_connect() * mosquitto_disconnect() * mosquitto_subscribe() * mosquitto_unsubscribe() * mosquitto_publish() ***************************************************/ /* ====================================================================== * * Section: Library version, init, and cleanup * * ====================================================================== */ /* * Function: mosquitto_lib_version * * Can be used to obtain version information for the mosquitto library. * This allows the application to compare the library version against the * version it was compiled against by using the LIBMOSQUITTO_MAJOR, * LIBMOSQUITTO_MINOR and LIBMOSQUITTO_REVISION defines. * * Parameters: * major - an integer pointer. If not NULL, the major version of the * library will be returned in this variable. * minor - an integer pointer. If not NULL, the minor version of the * library will be returned in this variable. * revision - an integer pointer. If not NULL, the revision of the library will * be returned in this variable. * * Returns: * LIBMOSQUITTO_VERSION_NUMBER - which is a unique number based on the major, * minor and revision values. * See Also: * , */ libmosq_EXPORT int mosquitto_lib_version(int *major, int *minor, int *revision); /* * Function: mosquitto_lib_init * * Must be called before any other mosquitto functions. * * This function is *not* thread safe. * * Returns: * MOSQ_ERR_SUCCESS - on success. * MOSQ_ERR_UNKNOWN - on Windows, if sockets couldn't be initialized. * * See Also: * , */ libmosq_EXPORT int mosquitto_lib_init(void); /* * Function: mosquitto_lib_cleanup * * Call to free resources associated with the library. * * Returns: * MOSQ_ERR_SUCCESS - always * * S

资源文件列表:

库包.zip 大约有6个文件
  1. 库包/libcrypto-3-x64.dll 6.07MB
  2. 库包/libssl-3-x64.dll 1.19MB
  3. 库包/mosquitto.dll 85KB
  4. 库包/mosquitto.h 123.11KB
  5. 库包/mosquitto.lib 28.04KB
  6. 库包/
0评论
提交 加载更多评论
其他资源 java web项目校园二手交易管理系统jsp+struts+hibernate-java课程设计毕业设计期末大作业
本项目是一个基于JSP、Struts和Hibernate框架的校园二手交易管理系统,旨在为在校大学生的Java课程设计和毕业设计提供宝贵的学习参考与实践支持。帮助学生深入理解Java Web开发中的多层架构设计和技术实现。通过本项目,学习者将能够掌握JSP和Struts的应用,深入了解Hibernate框架在数据持久化中的重要角色。
java web项目新生报到系统jsp+mysql-java课程设计毕业设计期末大作业
本项目是一个基于JSP和MySQL数据库的新生报到系统,专为在校大学生的Java课程设计和毕业设计提供学习参考与实践支持。该系统主要功能包括公寓信息管理、新生信息管理、缴费信息管理等,旨在简化新生入学流程,提升管理效率。 通过本项目,学习者将深入了解JSP技术在Web开发中的应用,以及如何使用MySQL进行数据存储和管理。项目中详细的代码注释和结构清晰的设计,帮助Java技术爱好者轻松理解和应用所学知识,实现从理论到实践的转变。
【保姆级IDF】ESP32调试利器:xtensa-esp32-elf-addr2line介绍、安装、使用
【保姆级IDF】ESP32调试利器:xtensa-esp32-elf-addr2line介绍、安装、使用
java web项目医药销售管理系统spring+springMVC+mysql-java课程设计毕业设计期末大作业
本项目是一个基于Spring框架、Spring MVC和MySQL数据库的医药销售管理系统,专为在校大学生的Java课程设计和毕业设计提供宝贵的学习参考与实践支持。该系统主要功能包括药品管理、供货商管理、销售人员管理、医院管理等,旨在提升医药销售的管理效率和数据处理能力。 通过本项目,学习者将深入理解Spring和Spring MVC在Web开发中的应用,以及如何使用MySQL进行高效的数据存储和管理。项目中的清晰的代码结构,能够帮助Java技术爱好者轻松上手,并在实际开发中有效应用所学知识。无论是作为课程设计的参考,还是作为毕业设计的基础,本医药销售管理系统都能为您提供丰富的学习资源和实践经验。
w7-12-学生-第六讲 函数2.zip
w7-12-学生-第六讲 函数2.zip
w7-12-学生-第六讲 函数2.zip w7-12-学生-第六讲 函数2.zip w7-12-学生-第六讲 函数2.zip
javaweb项目高校教务管理系统springMVC+mysql-java课程设计毕业设计期末大作业
本项目是一个基于Spring MVC框架和MySQL数据库的高校教务管理系统,旨在为在校大学生的Java课程设计和毕业设计提供有价值的学习参考,帮助学生更好地理解和掌握Java Web开发技术。通过本项目,学习者可以深入了解Spring MVC的架构设计、MySQL数据库的操作以及如何构建一个功能完善的Web应用。
java swing项目汽车租赁系统mysql数据库-java课程设计毕业设计期末大作业
本资源为Java Swing项目汽车租赁系统,基于MySQL数据库,适用于Java课程设计、毕业设计和期末大作业的学习参考。系统采用Java Swing构建用户友好的图形界面,结合JDBC和MySQL数据库实现车辆信息管理功能。该系统功能丰富,结构清晰,具有良好的可扩展性,便于学习与理解。非常适合在校大学生作为课程设计或毕业设计的参考项目,同时也是Java技术爱好者进行编程实践的理想素材。本项目可以帮助用户掌握Java图形界面编程和数据库交互的技术要点。
java swing项目购物系统mysql数据库-java课程设计毕业设计期末大作业
本资源为Java Swing项目购物系统,采用MySQL数据库,适用于Java课程设计、毕业设计以及期末大作业的学习参考。该系统使用Java Swing构建用户界面,结合JDBC与MySQL数据库实现商品查询、购物车管理等功能模块。该项目非常适合在校大学生进行参考与学习,同时为Java技术爱好者提供了极好的学习资源。通过本项目,用户可以深入学习Java图形界面编程和数据库操作的综合应用。