Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V5sync #1

Closed
wants to merge 17 commits into from
Closed

V5sync #1

wants to merge 17 commits into from

Conversation

CIPop
Copy link
Owner

@CIPop CIPop commented Jul 26, 2023

- Reuses MQTTClient as much as possible:
	○ I/O Model:
		§ Sync sending blocking functions that wait completion (ACK / PUBCOMP).
			□ Used for CONNECT/ACK, PUB/ACK, SUB/ACK, DISCONNECTsend
			□ Optionally, a "WithResults" version exists to retrieve data from the ACK
		§ Async receiving callbacks (must exit for the operation to complete)
			□ Used for PUBrecv, AUTH and DISCONNECTrecv
		
	○ #if defined(MQTTV5) used throughout MQTTClient.h/c
	○ One pending operation / call (blocking):
		§ CONNECT /w optional CONNACK information
		§ SUBSCRIBE (one topicFilter) /w optional SUBACK info
	
- NEW: MQTTClient functionality:
	○ PUB /w optional PUBACK/PUBCOMP information (PubDoneData / MQTTPublishWithResults)

- MQTTV5 Client differences:
	○ Ctor will require a reusable MQTTProperties* struct, allocated by the application.
	○ All APIs now accept or return MQTTProperties (CONNECT accepts both connect and will !?)
	○ New APIs, only available in V5:
		- MQTTV5Auth and MQTTV5SetAuthHandler (controlHandler)
		- MQTTV5SetDisconnectHandler (controlHandler)
		- MQTTV5UnsubscribeWithResults + MQTTV5UnsubackData

Open question:

  • MQTTV5Packet - For symmetry, should MQTTPacket_willOptions (backed by MQTTPacket_willOptions_initializer) include the MQTTProperties* willProperties?

MQTTClient-C/src/V5/MQTTV5Client.h Outdated Show resolved Hide resolved
* @param sendbuf
* @param sendbuf_size
* @param readbuf
* @param readbuf_size
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param readbuf_size
* @param readbuf_size
* @param recvProperties

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review params for this file - there are a few others missing as well

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - documentation is not ready - sorry I forgot to add that limitation.

MQTTClient-C/src/V5/MQTTV5Client.h Outdated Show resolved Hide resolved
@CIPop CIPop closed this Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants