Giter Club home page Giter Club logo

mqtt-protocol-c's Introduction

mqtt-protocol-c

Zero-copy, interruptible MQTT protocol parser and serialiser written in C

Overview

mqtt-protocol-c is designed for use in resource-constrained environments. To that end, it avoids making any memory allocations or assumptions about the underlying system. It handles only the binary parsing/serialising part of the MQTT protocol, leaving all the logic and networking up to the user.

API

Please see the header and implementation files for now to see how these all fit together.

mqtt_buffer_dump

void mqtt_buffer_dump(mqtt_buffer_t* buffer);

mqtt_buffer_dump_ascii

void mqtt_buffer_dump_ascii(mqtt_buffer_t* buffer);

mqtt_buffer_dump_hex

void mqtt_buffer_dump_hex(mqtt_buffer_t* buffer);

mqtt_error_string

const char* mqtt_error_string(mqtt_error_t error);

mqtt_message_init

void mqtt_message_init(mqtt_message_t* message);

mqtt_message_dump

void mqtt_message_dump(mqtt_message_t* message);

mqtt_parser_init

void mqtt_parser_init(mqtt_parser_t* parser);

mqtt_parser_buffer

void mqtt_parser_buffer(mqtt_parser_t* parser, uint8_t* buffer, size_t buffer_length);

mqtt_parser_execute

mqtt_parser_rc_t mqtt_parser_execute(mqtt_parser_t* parser, mqtt_message_t* message, uint8_t* data, size_t len, size_t* nread);

mqtt_serialiser_init

void mqtt_serialiser_init(mqtt_serialiser_t* serialiser);

mqtt_serialiser_size

size_t mqtt_serialiser_size(mqtt_serialiser_t* serialiser, mqtt_message_t* message);

mqtt_serialiser_write

mqtt_serialiser_rc_t mqtt_serialiser_write(mqtt_serialiser_t* serialiser, mqtt_message_t* message, uint8_t* buffer, size_t len);

License

3-clause BSD. A copy is included with the source.

Contact

mqtt-protocol-c's People

Contributors

deoxxa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.