Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including limecoap with all npm packages installed. Try it out:

var limecoap = require("limecoap")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

limecoap v0.1.4

limerun OWIN-JS CoAP Server and Middleware

limerun limecoap

Build Status NPM NPM NPM

NPM

About

limecoap is the reference implementation for the Constrained Application Protocol (CoAP) protocol extensions to the limerun (OWIN-JS) REST framework for Node.js.

It is an open-source, standards-based, drop-in replacement for COAP servers such as node-coap.

It uses the widely used library 'coap-packet' for protocol formatting.

Written in plain javascript for maximum portability to constrained devices

Makes CoAP messages look to an application just like an HTTP message so little or no application changes required to support multiple REST protocols

Status

Early work in process, not for production use.

Includes:

Server Functions

  • Layered protocol based on native UDP sockets
  • Translation from UDP Raw Message to CoAP Packet in standard OWIN-JS format, compatible with all HTTP and COAP applications including those written for Express, Connect, etc!
  • Optional logging middleware for each inbound message
  • Server and Client Request caching middleware
  • Confirmable send middleware that keeps retrying until acknowledgements received
  • Auto-Acknowledge middleware that automatically takes care of sending acknowledgements to inbound confirmable requests/responses
  • Observable messages (publish/subscribe)

Client Functions

  • Layered protocol based on native UDP sockets
  • Translation from CoAP Packet in standard OWIN-JS format to CoAP Raw Message
  • Optional logging middleware
  • Client Request caching middleware
  • Confirmable send middleware that keeps retrying until acknowledgements received
  • Auto-Acknowledge middleware that automatically takes care of sending acknowledgements to inbound confirmable responses
  • Observable messages (publish/subscribe)

Roadmap

Next steps are to more fully test the existing functions, and then build a reference framework to link together server, client, discovery and other protocol functions.

Adding additional features of the protocol such as Type 2 Blocks, is as simple as adding a new middleware function (10-30 lines of javascript)

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free