
MQTT 4 Models
A kotlin multiplatform library which defines all the MQTT 4 models defined in the MQTT spec.
Report Bug
·
Request Feature
Table of Contents
-
About The Project
- Installation
-
Usage
-
Building Locally
- Getting Started
- Roadmap
- Contributing
- License
About The Project
Runtime Dependencies
Installation
Gradle
NPM
Usage
Serializing and deserializing a packet from a buffer
val connectionRequest = ConnectionRequest(clientId = "test", userName = "yolo")
val buffer = PlatformBuffer.allocate(connectionRequest.packetSize())
connectionRequest.serialize(buffer)
buffer.resetForRead()
val connectionRequestFromBuffer = ControlPacketV4Factory.from(buffer)
// or can be done without having to specify version number directly
val connectionRequestFromBuffer = connectionRequest.controlPacketFactory.from(buffer)
assertEquals(connectionRequest, connectionRequestFromBuffer)
Building Locally
git clone git@github.com:DitchOoM/mqtt-4-models.git
- Open cloned directory with Intellij IDEA.
Roadmap
See the open issues for a list of proposed
features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire,
and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
)
- Commit your Changes (
git commit -m 'Add some AmazingFeature'
)
- Push to the Branch (
git push origin feature/AmazingFeature
)
- Open a Pull Request
License
Distributed under the Apache 2.0 License. See LICENSE
for more information.