https://github.com/morkai/h5.coap
Implementation of the Constrained Application Protocol (CoAP) client for node.js.
https://github.com/morkai/h5.coap
Last synced: 5 months ago
JSON representation
Implementation of the Constrained Application Protocol (CoAP) client for node.js.
- Host: GitHub
- URL: https://github.com/morkai/h5.coap
- Owner: morkai
- License: mit
- Created: 2013-06-29T19:40:43.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2014-01-27T23:50:32.000Z (over 12 years ago)
- Last Synced: 2025-10-30T08:56:32.180Z (8 months ago)
- Language: JavaScript
- Size: 217 KB
- Stars: 61
- Watchers: 8
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
- awesome-iot - h5.coap ★ 36 ⧗ 26 - Implementation of the Constrained Application Protocol (CoAP) client for node.js. (Protocol Library / CoAP)
- awesome_iot - h5.coap ★ 36 ⧗ 26 - Implementation of the Constrained Application Protocol (CoAP) client for node.js. (Protocol Library / CoAP)
README
# h5.coap
Implementation of the Constrained Application Protocol (CoAP) client for node.js.
[](https://travis-ci.org/morkai/h5.coap)
Implemented client-side features:
- [draft-ietf-core-coap-18](http://tools.ietf.org/html/draft-ietf-core-coap-18)
- [draft-ietf-core-block-12](http://tools.ietf.org/html/draft-ietf-core-block-12)
- Block1 + Block2 (server initiative)
- [draft-ietf-core-observe-08](http://tools.ietf.org/html/draft-ietf-core-observe-08)
- Observe + Block2 (server initiative)
- Re-registration after a Max-Age expiration
- Re-registration after a blockwise timeout
- See the [test/functional/](test/functional/) directory for a list of tested scenarios.
## Example
```
npm install git://github.com/morkai/h5.coap git://github.com/morkai/h5.linkformat
```
```js
var coap = require('h5.coap');
var linkformat = require('h5.linkformat');
var client = new coap.Client();
var req = client.get('coap://127.0.0.1/.well-known/core', {
accept: 'application/link-format'
});
req.on('response', function(res)
{
if (res.isSuccess())
{
console.log(linkformat.parse(res.getPayload().toString()));
}
else
{
console.log(res.toPrettyString());
}
});
```
## TODO
- More tests
- Readme
- Documentation
- npm publish
## License
This project is released under the
[MIT License](https://raw.github.com/morkai/h5.coap/master/license.md).