The Constrained Application Protocol (CoAP) is a RESTful web transfer protocol for resource-constrained networks and nodes. CoAP.PubSub is a publish/subscription REST API to allow a server to act as the distribution point for data.
The specification for the REST API can be found at PubSub.
Copyright (c) 2017, Jim Schaad [email protected]
The C# implementation will be available in the NuGet Package Gallery under the name Com.AugustCellars.CoAP.PubSub. To install this library as a NuGet package, enter 'Install-Package Com.AugustCellars.CoAP.PubSub' in the NuGet Package Manager Console.
Documentation can be found in two places. First an XML file is installed as part of the package for inline documentation.
There is currently only server side code to implement the resources needed. The client code is expected to use the standard client APIs.
A new CoAP server can be easily built with help of the class CoapServer
static void Main(String[] args)
{
CoapServer server = new CoapServer();
server.Add(new PubSubResource("ps"));
server.Start();
Console.ReadKey();
}
See CoAP Example Server for more.
I am currently sync-ed up to Visual Studio 2017 and have started using language features of C# v7.0 that are supported both in Visual Studio and in the latest version of mono.
See LICENSE for more info.