mqtt_crystal
mqtt_crystal
pure crystal mqtt client
Installation
Add this to your application's shard.yml
:
dependencies:
mqtt_crystal:
github: liu-chong/mqtt_crystal
branch: master
Usage
require "mqtt_crystal"
# host, port, username, password or url
client = MqttCrystal::Client.new(url: "mqtt://iot.eclipse.org") # mqtt://user:password@iot.eclipse.org:1883
spawn {
999.times { |i|
sleep rand.seconds
client.publish("lccc/teeest/topiiic", "test #{i} payload xxxxyyyyyy")
}
}
client.get("lccc/teeest/#") { |t, m|
puts "#{t}, #{m}"
}
Development
git clone https://github.com/liu-chong/mqtt_crystal.git
cd mqtt_crystal
crystal spec
Contributing
- Fork it ( https://github.com/liu-chong/mqtt_crystal/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- [liu-chong] Liu Chong - creator, maintainer
Repository
mqtt_crystal
Owner
Statistic
- 14
- 2
- 0
- 0
- 0
- about 5 years ago
- March 14, 2018
License
MIT License
Links
Synced at
Sat, 21 Dec 2024 22:53:47 GMT
Languages