{"id":22192865,"url":"https://github.com/rolandkoenig/messagecommunicator","last_synced_at":"2025-07-26T23:31:26.141Z","repository":{"id":64609844,"uuid":"266582683","full_name":"RolandKoenig/MessageCommunicator","owner":"RolandKoenig","description":"MessageCommunicator is a library + testing Gui for message-based communication. The library can be integrated in .NET Standard 2, .NET 6.0 and .NET 7.0 apps. The Gui is build using C# and Avalonia, therefore it supports the desktop environments on Windows, Linux and Mac.","archived":false,"fork":false,"pushed_at":"2024-12-01T18:10:45.000Z","size":5152,"stargazers_count":13,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-01T19:21:23.026Z","etag":null,"topics":["avalonia","cross-platform","csharp","dotnet","tcp","tcp-client","tcp-server","tcp-socket"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RolandKoenig.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2020-05-24T16:40:11.000Z","updated_at":"2024-12-01T18:10:50.000Z","dependencies_parsed_at":"2024-12-02T02:00:34.914Z","dependency_job_id":null,"html_url":"https://github.com/RolandKoenig/MessageCommunicator","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RolandKoenig%2FMessageCommunicator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RolandKoenig%2FMessageCommunicator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RolandKoenig%2FMessageCommunicator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RolandKoenig%2FMessageCommunicator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RolandKoenig","download_url":"https://codeload.github.com/RolandKoenig/MessageCommunicator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227732190,"owners_count":17811361,"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":["avalonia","cross-platform","csharp","dotnet","tcp","tcp-client","tcp-server","tcp-socket"],"created_at":"2024-12-02T12:40:41.110Z","updated_at":"2024-12-02T12:40:41.938Z","avatar_url":"https://github.com/RolandKoenig.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MessageCommunicator \u003cimg src=\"src/_Misc/MessageCommunicator.svg\" width=\"32\" /\u003e\n\n## About\nMessageCommunicator is a .NET library + testing Gui for message-based communication. \nThe library can be integrated into apps supporting .NET Standard 2.0 or .NET 8.0. It \nis distributed using Nuget. The Gui is build using C# and Avalonia, \ntherefore it supports the desktop environments on Windows, Linux and Mac.\n\n## Quick Links\n - [Current progress / roadmap](/../../projects/1)\n - [Releases](/../../releases)\n - [Nuget](https://www.nuget.org/packages/MessageCommunicator)\n\n## Build\n - ![CI on main (.NET 8.0.x on Ubuntu)](https://github.com/RolandKoenig/MessageCommunicator/workflows/CI%20on%20main%20(.NET%208.0.x%20on%20Ubuntu)/badge.svg)\n - ![CI on develop (.NET 8.0.x on Ubuntu)](https://github.com/RolandKoenig/MessageCommunicator/workflows/CI%20on%20develop%20(.NET%208.0.x%20on%20Ubuntu)/badge.svg)\n\n### Features\nThe library provides the following features:\n - Automated reconnect handling (you don't have to care about the connection)\n - Message recognition (e. g. by end symbol, by fixed length, etc.)\n - String encoding\n - Different channel types (TCP, UDP, SerialPort)\n\n### Library\nThe library is designed to be cross-platform, asynchronous and to use as less object allocations as possible.\nIn the following example we are creating a channel which listens for incoming tcp connections on\nport 12000. Messages are encoded by UTF8 and use ## as end sign.\n\n```csharp\n// Create and start passive channel (listens for incoming tcp connection)\nvar passiveTcpChannel = new MessageChannel(\n    new TcpPassiveByteStreamHandlerSettings(IPAddress.Loopback, 12000),\n    new EndSymbolsMessageRecognizerSettings(Encoding.UTF8, \"##\"),\n    (message) =\u003e\n    {\n        Console.WriteLine($\"Received message on passive channel: {message}\");\n    });\nawait passiveTcpChannel.StartAsync();\n```\n\nIn the following example we are doing almost the same. The only difference is that we do not \nlisten. Here we are connecting to port 12000 on the localhost.\n\n```csharp\n// Create and start send channel\nvar activeTcpChannel = new MessageChannel(\n    new TcpActiveByteStreamHandlerSettings(IPAddress.Loopback, 12000), \n    new EndSymbolsMessageRecognizerSettings(Encoding.UTF8, \"##\"),\n    (message) =\u003e\n    {\n        Console.WriteLine($\"Received message on active channel: {message}\");\n    });\nawait activeTcpChannel.StartAsync();\n```\n\nSending a message is as easy as:\n```csharp\nawait activeTcpChannel.SendAsync(\"Message 1 from active to passive...\");\n```\n\n### Gui\nInside the testing Gui you can manage multiple profiles. Each profile has its own configuration\nfor which stream it uses (tcp active, tcp passive. ...) and which message recognizer it uses\n(endsymbols, etc.). The Gui also displays all logging messages which come through the logger of \nthe corresponding message channel.\n\n![alt text](src/_Misc/WikiImages/Screenshot_01.png \"Screenshot of the testing UI\")\n\n![alt text](src/_Misc/WikiImages/Screenshot_02.png \"Screenshot of the testing UI\")\n\n## Project is based on...\nMessageCommunicator GUI is based on .NET 7 and meant to be cross-platform. The Library supports .NET Standard 2.0, .NET 6.0 and .NET 7.0.\n\nThe project is based on following technologies / projects:\n - [Avalonia](https://github.com/AvaloniaUI/Avalonia): Cross-platform, Xaml based UI framework\n - [Avalonia.IconPacks](https://github.com/ahopper/Avalonia.IconPacks): A good collection of free vector icons ready to be used in Avalonia applications\n - [Inconsolata](https://fonts.google.com/specimen/Inconsolata): Inconsolata is an open-source font created by Raph Levien and released under the SIL Open Font License.\n - [Light.GuardClauses](https://github.com/feO2x/Light.GuardClauses): A lightweight .NET library for expressive Guard Clauses\n - [Markdown.Avalonia](https://github.com/whistyun/Markdown.Avalonia): Markdown.Avalonia is a portted version of [MdXaml](https://github.com/whistyun/MdXaml) for Avalonia UI. It can render Markdown with avalonia.\n - [ReactiveUI](https://github.com/reactiveui/ReactiveUI): Cross-platform mvvm framework. Avalonia has additional integration for ReactiveUI\n - [StringFormatter](https://github.com/MikePopoloski/StringFormatter): A copy/paste ready alternative to StringBuilder. StringFormatter is optimized for less object allocations\n - [Svg.Skia](https://github.com/wieslawsoltes/Svg.Skia): SVG rendering library with good Avalonia integration.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frolandkoenig%2Fmessagecommunicator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frolandkoenig%2Fmessagecommunicator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frolandkoenig%2Fmessagecommunicator/lists"}