wolfSSL / wolfMQTT

wolfMQTT is a small, fast, portable MQTT client implementation, including support for TLS 1.3.
https://www.wolfssl.com
GNU General Public License v2.0
518 stars 156 forks source link

Use wolfMQTT without sockets #357

Closed rinosh1989 closed 9 months ago

rinosh1989 commented 9 months ago

Hi,

I want to use wolfmqtt library with the following settings

  1. I want to use my own socket library implementation ie like embedded implementation
  2. I want to use the library in async mode i.e handle callbacks myself.
  3. I want to use MQTT v5 features.
  4. I dont use the TLS features right now. Later on I want to use it with openssl.

Is this possible out of the box( ie configuration)? Do you have an example to use it with our own socket implementation?

embhorn commented 9 months ago

Hi @rinosh1989

Thanks for your interest in the wolfMQTT project. Yes, the network layer is fully customizable by the application. The default example uses sockets also: https://github.com/wolfSSL/wolfMQTT/blob/master/examples/mqttnet.c There is even an example of setting up for UART: https://github.com/wolfSSL/wolfMQTT/blob/master/examples/mqttuart.c

By "async" mode, I presume you mean non-blocking. You can set the configure option --enable-nonblock (or define WOLFMQTT_NONBLOCK ) to enable the library functionality.

wolfMQTT fully supports the MQTTv5.0 specification. Configure with --enable-v5 Check out the examples for using command properties: https://github.com/wolfSSL/wolfMQTT/blob/master/examples/mqttclient/mqttclient.c

TLS is highly recommended, but you can build wolfMQTT without support for TLS using configure option --disable-tls. wolfMQTT is designed to work with wolfSSL for security. You should give wolfSSL a try!

Let us know if there are any questions.

Kind regards, @embhorn - wolfSSL Support

embhorn commented 9 months ago

Hi @rinosh1989

I believe I answered your questions, so I'll go ahead and close this issue. Please feel free to re-open if there are any other questions.

Thanks, @embhorn