Can be reproduced by the following program.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Scarlet.Communications;
using Scarlet.Utilities;
namespace ConsoleAppClient
{
class Program
{
static void Main(string[] args)
{
Client.Start("127.0.0.1", 2000, 2001, "MyClient");
System.Threading.Thread.Sleep(3000);
for (int i = 0; i < 20; i++)
{
Packet MyPack = new Packet(new Message(0xc3, UtilData.ToBytes("Hello, World!")), false);
Client.Send(MyPack);
//System.Threading.Thread.Sleep(500);
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Scarlet.Communications;
using Scarlet.Utilities;
class Program
{
static void Main(string[] args)
{
Server.Start(2000, 2001);
Parse.SetParseHandler(0xc3, ReceiveMessage);
}
static void ReceiveMessage(Message message)
{
Console.WriteLine("Got message");
Console.WriteLine(UtilData.ToString(message.Payload));
}
}
Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: str
at System.String.Copy(String str)
at Scarlet.Communications.Packet.Clone()
at Scarlet.Communications.Client.SendPackets()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()