EasyTcp 2.0.0

There is a newer version of this package available.
See the version list below for details.
The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package EasyTcp --version 2.0.0
NuGet\Install-Package EasyTcp -Version 2.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EasyTcp" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EasyTcp --version 2.0.0
#r "nuget: EasyTcp, 2.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install EasyTcp as a Cake Addin
#addin nuget:?package=EasyTcp&version=2.0.0

// Install EasyTcp as a Cake Tool
#tool nuget:?package=EasyTcp&version=2.0.0

Welcome to the EasyTcp documentation! I am working hard on te documentation, please wait for the more advanced stuff.

First download the nuget package.

Getting started

Add using EasyTcp; for the Message and Encryption class. The message class is used by the event handler DataReceived.

Add using EasyTcp.Client; for the EasyTcpClient class.

Add using EasyTcp.Server; for the EasyTcpServer class;

Example of a simple server wich print the length of the received data:

using System;
using EasyTcp;
using EasyTcp.Server;

namespace EasyTcpExampleServer
{
    class Program
    {
        static void Main(string[] args)
        {
            EasyTcpServer Server = new EasyTcpServer();
            /* Start a server:
             * IP: IPAddress.Any(IPv4)
             * Port: 999
             * MaxConnections: 1000
             */
            Server.Start(System.Net.IPAddress.Any,999,1000);
            Server.DataReceived += DataReceived;//Set event for DataReceived.

            System.Threading.Tasks.Task.Delay(-1);//Don't exit the console.
        }

        private static void DataReceived(object sender, Message e)
        {
            Console.WriteLine($"Received: {e.Data.Length} bytes");
        }
    }
}

Example of a simple client wich send to the server: "Hey server"

using System;
using EasyTcp;
using EasyTcp.Client;

namespace EasyTcpExampleClient
{
    class Program
    {
        static void Main(string[] args)
        {
            EasyTcpClient Client = new EasyTcpClient();
            /*Connect to server:
             * IP: 127.0.0.1(IPv4)
             * Port: 999
             * Timeout: 1 second
             */
            bool Connected = Client.Connect("127.0.0.1",999,TimeSpan.FromSeconds(1));

            if(!Connected)
            {
                Console.WriteLine("Could not connect to server");
                Console.ReadKey();
                return;
            }

            Client.Send("Hey server");        
        }
    }
}
Product 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 is compatible.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 2.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on EasyTcp:

Package Downloads
EasyTcp.Actions

Support for EasyTcp to triggering specific functions with an attribute based on received data. See github for examples.

EasyTcp.Encryption

Ssl support for EasyTcp and EasyTcp.Actions

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on EasyTcp:

Repository Stars
Job79/EasyTcp
TCP framework for C#. Focused on usability and performance.
Version Downloads Last updated
4.0.2 5,651 4/24/2022
4.0.1 1,188 4/9/2022
4.0.0 4,280 7/10/2021