下载资源后端资源详情
库包.zip
大小:2.39MB
价格:38积分
下载量:0
评分:
5.0
上传者:2301_77294140
更新日期:2024-10-22

windows MQTT mosquitto2.0.18a安装包

资源文件列表(大概)

文件名
大小
库包/libcrypto-3-x64.dll
6.07MB
库包/libssl-3-x64.dll
1.19MB
库包/mosquitto.dll
85KB
库包/mosquitto.h
123.11KB
库包/mosquitto.lib
28.04KB
库包/
-

资源内容介绍

用于windows c++ 连接MQTT
#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 __cplusplusextern "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 <stdbool.h>#endif#endif#include <stddef.h>#include <stdint.h>#define LIBMOSQUITTO_MAJOR 2#define LIBMOSQUITTO_MINOR 0#define LIBMOSQUITTO_REVISION 18#define LIBMOSQUITTO_VERSION_NUMBER (LIBMOSQUITTO_MAJOR*1000000+LIBMOSQUITTO_MINOR*1000+LIBMOSQUITTO_REVISION)#define MOSQ_LOG_NONE0#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_INTERNAL0x80000000U#define MOSQ_LOG_ALL0xFFFFFFFFU/* 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 <mosquitto_int_option>, <mosquitto_string_option>, and <mosquitto_void_option>. */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,};#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 *<mosquitto_lib_init> 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 <mosquitto_threaded_set> 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: * <mosquitto_lib_cleanup>, <mosquitto_lib_init> */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: * <mosquitto_lib_cleanup>, <mosquitto_lib_version> */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

用户评论 (0)

发表评论

captcha

相关资源

java web项目校园二手交易管理系统jsp+struts+hibernate-java课程设计毕业设计期末大作业

本项目是一个基于JSP、Struts和Hibernate框架的校园二手交易管理系统,旨在为在校大学生的Java课程设计和毕业设计提供宝贵的学习参考与实践支持。帮助学生深入理解Java Web开发中的多层架构设计和技术实现。通过本项目,学习者将能够掌握JSP和Struts的应用,深入了解Hibernate框架在数据持久化中的重要角色。

11.64MB34积分

java web项目新生报到系统jsp+mysql-java课程设计毕业设计期末大作业

本项目是一个基于JSP和MySQL数据库的新生报到系统,专为在校大学生的Java课程设计和毕业设计提供学习参考与实践支持。该系统主要功能包括公寓信息管理、新生信息管理、缴费信息管理等,旨在简化新生入学流程,提升管理效率。通过本项目,学习者将深入了解JSP技术在Web开发中的应用,以及如何使用MySQL进行数据存储和管理。项目中详细的代码注释和结构清晰的设计,帮助Java技术爱好者轻松理解和应用所学知识,实现从理论到实践的转变。

13.36MB14积分

【保姆级IDF】ESP32调试利器:xtensa-esp32-elf-addr2line介绍、安装、使用

【保姆级IDF】ESP32调试利器:xtensa-esp32-elf-addr2line介绍、安装、使用

99.4MB36积分

java web项目医药销售管理系统spring+springMVC+mysql-java课程设计毕业设计期末大作业

本项目是一个基于Spring框架、Spring MVC和MySQL数据库的医药销售管理系统,专为在校大学生的Java课程设计和毕业设计提供宝贵的学习参考与实践支持。该系统主要功能包括药品管理、供货商管理、销售人员管理、医院管理等,旨在提升医药销售的管理效率和数据处理能力。通过本项目,学习者将深入理解Spring和Spring MVC在Web开发中的应用,以及如何使用MySQL进行高效的数据存储和管理。项目中的清晰的代码结构,能够帮助Java技术爱好者轻松上手,并在实际开发中有效应用所学知识。无论是作为课程设计的参考,还是作为毕业设计的基础,本医药销售管理系统都能为您提供丰富的学习资源和实践经验。

42.42MB11积分