Skip to content

Can be more Platform Abstraction? #27

@Singa17

Description

@Singa17

I am started using this stack for my project and found its started working as expected. I am having little bit challenges as follow

My Project builds on C++ 17.

  1. I have my own mutex. If i enable multithread by default #include <shared_mutex> is enabled. Now i have to change the stack code point my mutex. Can we do something here? Can this mutex to be moved to platform?

  2. Also i have my own Socket manager to send or receive. and i use both TLS and non TLS. I Can manage with MQTTOnlyBSDSocket = 0 to point my socket manager. is it possible to move the mbedtls to platform? so that this code will look clean :-)

  3. I get compiler error that "warning C4200: nonstandard extension used: zero-sized array in struct/union".

           struct BinaryData
            {
                /** The data length in bytes */
                uint16 length;
                uint8  data[];

                /** Call this method to read the structure when it's casted from the network buffer */
                void swapNetwork() { length = BigEndian(length); }
            };

            /** A MQTT string is basically a string with a BigEndian size going first (section 1.5.4) */
            struct String
            {
                /** The string length in bytes */
                uint16 length;
                char   data[];

                /** Call this method to read the structure when it's casted from the network buffer */
                void swapNetwork() { length = BigEndian(length); }
            };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions