djdarkbeat / coap

Pure Ruby implementation of RFC 7252 (Constrained Application Protocol (CoAP))

Home Page:http://tools.ietf.org/html/rfc7252

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gem Version Dependency Status Build Status Coverage Status Code Climate

CoAP

This Ruby gem implements client functionality for RFC 7252, the Constrained Application Protocol (CoAP). The message parsing code included is written by Carsten Bormann, one of the RFC authors.

The Constrained Application Protocol (CoAP) is a specialized web transfer protocol for use with constrained nodes and constrained (e.g., low-power, lossy) networks. The nodes often have 8-bit microcontrollers with small amounts of ROM and RAM, while constrained networks such as 6LoWPAN often have high packet error rates and a typical throughput of 10s of kbit/s. The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.

Additionally supported extensions of the CoAP protocol:

Install

Add this line to your application's Gemfile:

gem 'coap'

And then execute:

$ bundle

Or install it yourself as:

$ gem install coap

Usage

In your Ruby (on Rails) application

require 'coap'
CoAP::Client.new.get_by_uri('coap://coap.me/hello').payload

See test/test_client.rb for more examples.

Command Line Client

The command line client supports the basic CoAP methods.

coap get coap://coap.me/.well-known/core

Testing

rake

Copyright

The code is published under the MIT license (see the LICENSE file).

Authors

About

Pure Ruby implementation of RFC 7252 (Constrained Application Protocol (CoAP))

http://tools.ietf.org/html/rfc7252

License:MIT License


Languages

Language:Ruby 100.0%