{"id":18930897,"url":"https://github.com/emitter-io/csharp","last_synced_at":"2025-04-15T16:32:00.071Z","repository":{"id":47311235,"uuid":"49020341","full_name":"emitter-io/csharp","owner":"emitter-io","description":"Client library for emitter.io compatible with .Net, .Net MicroFramework and WinRT","archived":false,"fork":false,"pushed_at":"2023-05-09T23:19:20.000Z","size":1925,"stargazers_count":29,"open_issues_count":7,"forks_count":21,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-10-04T11:04:19.356Z","etag":null,"topics":["emitter","mqtt-client","sdk"],"latest_commit_sha":null,"homepage":"http://emitter.io","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emitter-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["kelindar"]}},"created_at":"2016-01-04T20:12:51.000Z","updated_at":"2023-11-07T03:49:31.000Z","dependencies_parsed_at":"2024-06-18T22:53:17.559Z","dependency_job_id":"86834212-5a0b-4b1b-8be9-20e28009ab5e","html_url":"https://github.com/emitter-io/csharp","commit_stats":{"total_commits":71,"total_committers":9,"mean_commits":7.888888888888889,"dds":0.3802816901408451,"last_synced_commit":"d9218d6dd09cba1b7036ef434310dcbe5667f566"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emitter-io%2Fcsharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emitter-io%2Fcsharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emitter-io%2Fcsharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emitter-io%2Fcsharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emitter-io","download_url":"https://codeload.github.com/emitter-io/csharp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223090217,"owners_count":17085827,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["emitter","mqtt-client","sdk"],"created_at":"2024-11-08T11:39:24.212Z","updated_at":"2024-11-08T11:39:24.919Z","avatar_url":"https://github.com/emitter-io.png","language":"C#","readme":"# Emitter C# SDK\n\nThis repository contains C# client for .Net Framework, .Net Micro Framework and WinRT for [Emitter](https://emitter.io) (see also on [Emitter GitHub](https://github.com/emitter-io/emitter)). Emitter is an **open-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.\n\n![](https://img.shields.io/nuget/dt/Emitter.svg) ![](https://ci.appveyor.com/api/projects/status/9ij53wljl656lnfr?svg=true)\n\nThe current version supports several .Net Frameworks: \n\n* .Net Framework (2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1)\n* .Net Micro Framework 4.2, 4.3 and 4.4\n* Mono (for Linux O.S.)\n\nThe current version also supports WinRT platforms:\n\n* Windows 8.1\n* Windows Phone 8.1\n* Windows 10\n\nThis library provides a nicer MQTT interface fine-tuned and extended with specific features provided by [emitter.io](http://emitter.io). The library is based upon the [M2MQTT library](http://www.m2mqtt.net\n) written by [Paolo Patierno](https://m2mqtt.wordpress.com/who/) and released under Eclipse Public License.\n\n# Build Notes\nThe solution contains C# projects for Micro Framework.\n* 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/\n* 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\n\nAlternatively, the files can be downloaded from here:\n* [.Net MicroFramework 4.2 \u0026 4.3](https://s3.amazonaws.com/cdn.misakai.com/www-lib/MicroFramework4.3.msi)\n* [.Net MicroFramework 4.4](https://s3.amazonaws.com/cdn.misakai.com/www-lib/MicroFramework4.4.msi)\n\n# Nuget\n\nTo install Emitter, run the following command in the [Package Manager Console](http://docs.nuget.org/consume/package-manager-console):\n\n```\nInstall-Package Emitter\n```\n\n# Usage\n\nBelow is a sample program written using this C# client library. This demonstrates a simple console chat app where the messages are published to `chat` channel and every connected client receives them in real-time.\n\n```\n// Creating a connection to emitter.io service.\nvar emitter    = new Emitter.Connection(host, port);\nvar channelKey = \"\u003cchannel key for 'chat' channel\u003e\";\n\n// Connect to emitter.io service\nemitter.Connect();\n\n// Handle chat messages\nemitter.On(channelKey, \"chat\", (channel, msg) =\u003e\n{\n    Console.WriteLine(Encoding.UTF8.GetString(msg));\n});\n\n// Publish messages to the 'chat' channel\nstring text = \"\";\nConsole.WriteLine(\"Type to chat or 'q' to exit...\");\ndo\n{\n    text = Console.ReadLine();\n    emitter.Publish(channelKey, \"chat\", text);\n}\nwhile (text != \"q\");\n\n// Disconnect the client\nemitter.Disconnect();\n```\n\nTo generate a channel key using the secret key provided, the `GenerateKey` method can be used.\n\n```\n// Generate a read-write key for our channel\nemitter.GenerateKey(\n    \"\u003csecret key\u003e\", \n    \"chat\", \n    Messages.EmitterKeyType.ReadWrite, \n    (response) =\u003e Console.WriteLine(\"Generated Key: \" + response.Key)\n    );\n```\n","funding_links":["https://github.com/sponsors/kelindar"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femitter-io%2Fcsharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femitter-io%2Fcsharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femitter-io%2Fcsharp/lists"}