Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/GowenGit/meepo
.NET Core duplex framework using sockets
https://github.com/GowenGit/meepo
Last synced: 5 days ago
JSON representation
.NET Core duplex framework using sockets
- Host: GitHub
- URL: https://github.com/GowenGit/meepo
- Owner: GowenGit
- License: mit
- Created: 2017-08-12T21:57:01.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-13T00:09:01.000Z (about 6 years ago)
- Last Synced: 2024-08-02T18:40:04.626Z (3 months ago)
- Language: C#
- Size: 79.1 KB
- Stars: 7
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#
### [![Build Status](https://travis-ci.org/GowenGit/meepo.svg?branch=master)](https://travis-ci.org/GowenGit/meepo)
### Socket based duplex communication framework for .NET Core
Cross platform lightweight communication framework based on TCP Sockets. Provides basic
exception handling and automatic reconnects once the network is restored.### Example
You can initialize a new node like this:
```cs
var config = new MeepoConfig
{
Logger = new ConsoleLogger()
};// IP Address to expose
var address = new TcpAddress(IPAddress.Loopback, 9201);// Nodes to connect to
var serverAddresses = new[] { new TcpAddress(IPAddress.Loopback, 9200) };using (var meepo = new MeepoNode(address, serverAddresses, config))
{
meepo.Start();meepo.MessageReceived += x => System.Console.WriteLine(x.Bytes.Decode());
while (true)
{
var text = System.Console.ReadLine();meepo.SendAsync(text).Wait();
}
}
```You can pass in a `MeepoConfig` object that lets you change the behavior of the server:
```cs
var config = new MeepoConfig
{
BufferSizeInBytes = 1000,
Logger = new ConsoleLogger()
};...
var meepo = new Meepo(address, serverAddresses, config);
```### Installation
* Restore solution: `dotnet restore`
* Run the console app: `dotnet run`### License
MIT License