Netly 2.1.0
See the version list below for details.
dotnet add package Netly --version 2.1.0
NuGet\Install-Package Netly -Version 2.1.0
<PackageReference Include="Netly" Version="2.1.0" />
paket add Netly --version 2.1.0
#r "nuget: Netly, 2.1.0"
// Install Netly as a Cake Addin
#addin nuget:?package=Netly&version=2.1.0
// Install Netly as a Cake Tool
#tool nuget:?package=Netly&version=2.1.0
<h1 align="center"><a href="https://github.com/alec1o/netly">Netly</a></h1>
<h6 align="end">
<a href="https://netly.docs.kezero.com">Docs</a> -
<a href="mailto://support@kezero.com">Support</a> -
<a href="LICENSE.md">License</a>
</h6>
<h6 align="center"> powered by <a href="https://github.com/alec1o">ALEC1O</a> </h6>
<h6 align="center"> <img align="center" src="content/logo/netly-logo-3.png" width="128px"> <h6>
About
Netly is a open source socket library for c# (C-Sharp). It facilitates the use of socket (UDP and TCP, Client and Server) with which it is compatible (Android, iOS, macOS, Linux, Windows, ...) as long as it is compiled with its destination.
<br>
Docs
See the documentation here!
<br>
Versions
Notable changes
v1 (old) | v2 (current) | v3 (nonexistent) |
---|---|---|
<h5>TCP client/server</h5> | TCP/IP Message Framing | SSL client/server |
<h5>UDP client/server</h5> | TCP/UDP performance improvement | Add documentation and samples for SSL |
<br>
Dependency
<br>
Build
# 1. clone repository
$ git clone "https://github.com/alec1o/netly.git"
# 2. open source directory
$ cd netly/
# 5. restore dotnet project
$ dotnet restore
# 6. build dotnet project
$ dotnet build
<br>
List of tested platforms
<br>
Demo
Client
Instance
Usageusing Netly; using Netly.Core; // Example udp client instance var client = new UdpClient(); // Example tcp client instance var client = new TcpClient(); // Example host instance var host = new Host("127.0.0.1", 3000);
client.OnOpen(() => { // connection opened }); client.OnClose(() => { // connection closed }); client.OnError((exception) => { // error on open connection }); client.OnData((data) => { // buffer/data received }); client.OnEvent((name, data) => { // event received: {name: event name} {data: buffer/data received} }); // open connection client.Open(host); // send data client.ToData(new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9}); // send event client.ToEvent("name", new byte[] { 1, 2, 3, 4, 5, 6}); // close connection client.Close();
Server
Instance
Usageusing Netly; using Netly.Core; // Example tcp server instance var server = new TcpServer(); // Example udp server instance var server = new UdpServer(); // Example host instance var host = new Host("0.0.0.0", 3000);
server.OnOpen(() => { // connection opened: server start listen client }); server.OnClose(() => { // connection closed: server stop listen client }); server.OnError((exception) => { // error on open connection }); server.OnEnter((client) => { // client connected: connection accepted }); server.OnExit((client) => { // client disconnected: connection closed }); server.OnData((client, data) => { // buffer/data received: {client: client instance} {data: buffer/data received} }); server.OnEvent((client, name, data) => { // event received: {client: client instance} {name: event name} {data: buffer received} }); // open connection server.Open(host); // broadcast data to clients server.ToData(new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9}); // broadcast event to clients server.ToEvent("name", new byte[] { 1, 2, 3, 4, 5, 6}); // close connection server.Close();
<br>
Currently missing feature
Below are some missing features that are planned to be added in later versions.
- [SslClient and SslServer] Tcp protocol with SSL/TLS encryption.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Byter (>= 1.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
+ Fix. MainThread error
+ Add. Byter v1.1.0