-
Notifications
You must be signed in to change notification settings - Fork 757
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
MQTTPacket_readnb not exported to shared library #103
Comments
I introduced MQTTPacket_readnb() to work on a bare metal system, no OS, perhaps no need for a shared library. Since the function is non-blocking there is the need to have a state outside of it. |
This particular Linux client is connected to two separate server instances, which is a bit obtuse, but that's how it works out. This probably isn't the right client library for that scenario, but we're already using it embedded so it was easy to modify. I use a derived version of MQTTTransport which stores mbedtls contexts. |
The whole library assumes a single connection... even my introduced nb functions use a static (at the transport samples). I guess yours is not a very common connection scenario, I myself would expect an embedded client to connect to one server. Anyway, I just dropped by being parental on my function ;^) and I guess adding DDLExport does not introduce any extra overhead for the rest of us. |
MQTTPacket.h does not declare MQTTPacket_readnb with the DLLExport attribute. This is the only read API at the MQTTPacket level which allows passing a connection state context to getfn.
The text was updated successfully, but these errors were encountered: