Skip to content

atlantis/mqtt_crystal

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mqtt_crystal Build Status

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:[email protected]: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

  1. Fork it ( https://github.com/liu-chong/mqtt_crystal/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

About

MQTT Crystal client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Crystal 100.0%