Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork22
Client library for emitter.io compatible with .Net, .Net MicroFramework and WinRT
License
emitter-io/csharp
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This repository contains C# client for .Net Framework, .Net Micro Framework and WinRT forEmitter (see also onEmitter GitHub). Emitter is anopen-source real-time communication service for connecting online devices. At its core, emitter.io is a distributed, scalable and fault-tolerant publish-subscribe messaging platform based on MQTT protocol and featuring message storage.
The current version supports several .Net Frameworks:
- .Net Framework (2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1)
- .Net Micro Framework 4.2, 4.3 and 4.4
- Mono (for Linux O.S.)
The current version also supports WinRT platforms:
- Windows 8.1
- Windows Phone 8.1
- Windows 10
This library provides a nicer MQTT interface fine-tuned and extended with specific features provided byemitter.io. The library is based upon theM2MQTT library written byPaolo Patierno and released under Eclipse Public License.
The solution contains C# projects for Micro Framework.
- To build for .Net Micro Framework 4.2 or 4.3, you need to download .Net Micro Framework SDK from CodePlex:https://netmf.codeplex.com/
- To build for .Net Micro Framework 4.4, you need to download .Net Micro Framework SDK from GitHub:https://github.com/NETMF/netmf-interpreter/releases
Alternatively, the files can be downloaded from here:
To install Emitter, run the following command in thePackage Manager Console:
Install-Package EmitterBelow is a sample program written using this C# client library. This demonstrates a simple console chat app where the messages are published tochat channel and every connected client receives them in real-time.
// Creating a connection to emitter.io service.var emitter = new Emitter.Connection(host, port);var channelKey = "<channel key for 'chat' channel>";// Connect to emitter.io serviceemitter.Connect();// Handle chat messagesemitter.On(channelKey, "chat", (channel, msg) =>{ Console.WriteLine(Encoding.UTF8.GetString(msg));});// Publish messages to the 'chat' channelstring text = "";Console.WriteLine("Type to chat or 'q' to exit...");do{ text = Console.ReadLine(); emitter.Publish(channelKey, "chat", text);}while (text != "q");// Disconnect the clientemitter.Disconnect();To generate a channel key using the secret key provided, theGenerateKey method can be used.
// Generate a read-write key for our channelemitter.GenerateKey( "<secret key>", "chat", Messages.EmitterKeyType.ReadWrite, (response) => Console.WriteLine("Generated Key: " + response.Key) );About
Client library for emitter.io compatible with .Net, .Net MicroFramework and WinRT
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors8
Uh oh!
There was an error while loading.Please reload this page.