chore: mqtt impl, fix more wiznet bugs

This commit is contained in:
2024-11-10 02:47:54 +06:00
parent 80cf21f143
commit 3ac9c62241
19 changed files with 1093 additions and 253 deletions

View File

@@ -43,6 +43,8 @@
#define MAX_MESSAGE_HANDLERS 5 /* redefinable - how many subscriptions do you want? */
#endif
#define MAX_TOPIC_LENGTH 64
enum QoS { QOS0, QOS1, QOS2 };
/* all failure return codes must be negative */
@@ -97,7 +99,7 @@ typedef struct MQTTClient
struct MessageHandlers
{
const char* topicFilter;
char topicFilter[MAX_TOPIC_LENGTH];
void (*fp) (MessageData*);
} messageHandlers[MAX_MESSAGE_HANDLERS]; /* Message handlers are indexed by subscription topic */