Unity

import 🔗TcpServerKit_UnityCLient.unitypackage

Drag MuClient prefab from TcpClientKit folder to hierarchy and set IP and port

Add required namespace

using TcpClientKit;
using static TcpClientKit.Client;

Set connection event.

Client.ConnectResult += (ConnectingStatus cs) =>
{
};

Add listeners

Client.On("Login", LoginResult);
💡
Tip: when add new listener, if exists will be replaced

Start client

Client.InitServer();
//or
var encodingType = System.Text.Encoding.UTF8;
InitServer(encodingType);

For reconnecting

Client.CloseConnection();
Client.InitServer();
//or
var encodingType = System.Text.Encoding.UTF8;
InitServer(encodingType);