Net.TcpServer 1.0.2

Install-Package Net.TcpServer -Version 1.0.2
dotnet add package Net.TcpServer --version 1.0.2
<PackageReference Include="Net.TcpServer" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Net.TcpServer --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Net.TcpServer, 1.0.2"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Net.TcpServer as a Cake Addin
#addin nuget:?package=Net.TcpServer&version=1.0.2

// Install Net.TcpServer as a Cake Tool
#tool nuget:?package=Net.TcpServer&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

A single-file event asynchronous(APM) tcp server and tcp client adapter for tcp debug assistant
       // A echo server
       TcpServer tcpServer = new TcpServer(IPAddress.Any, TcpServer.GetFreePort());
       tcpServer.Start(_ =>
       {
           _.OnAccept = client =>
           {
               Console.WriteLine($"OnAccept: {client}");
           };
           _.OnReceive = (client, data) =>
           {
               Console.WriteLine($"OnReceive: {client} {Encoding.UTF8.GetString(data)}");
               client.Send(data, endPoint => Console.WriteLine($"Send: {endPoint} complated"));
           };
           _.OnError = (client, ex) =>
           {
               Console.WriteLine($"OnError: {client} {ex.Message}");
           };
           _.OnClose = (client, isCloseByClient) =>
           {
               Console.WriteLine($"OnClose: {client} {(isCloseByClient ? "by client" : "by server")}");
           };
       });
       Console.ReadKey();
       tcpServer.Stop();

  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 239 8/19/2020
1.0.1 218 2/11/2020
1.0.0 323 1/11/2020

A single-file event asynchronous(APM) tcp server and tcp client adapter