Removed NioTSO client and server

- NioTSO client isn't needed because we're using RayLib
- Added FreeSO's API server to handle most backend operations
This commit is contained in:
Tony Bark 2024-05-01 02:55:43 -04:00
parent f12ba1502b
commit 22191ce648
591 changed files with 53264 additions and 3362 deletions

View file

@ -0,0 +1,57 @@
using FSO.Common.Serialization;
using Mina.Core.Buffer;
namespace FSO.Server.Protocol.Voltron.Packets
{
public class ClientOnlinePDU : AbstractVoltronPacket
{
public ushort MajorVersion { get; set; }
public ushort MinorVersion { get; set; }
public ushort PointVersion { get; set; }
public ushort ArtVersion { get; set; }
public ulong Timestamp { get; set; }
public byte NumberOfAttempts { get; set; }
public byte LastExitCode { get; set; }
public byte LastFailureType { get; set; }
public byte FailureCount { get; set; }
public byte IsRunning { get; set; }
public byte IsReLogging { get; set; }
public override VoltronPacketType GetPacketType()
{
return VoltronPacketType.ClientOnlinePDU;
}
public override void Serialize(IoBuffer output, ISerializationContext context)
{
output.PutUInt16(MajorVersion);
output.PutUInt16(MinorVersion);
output.PutUInt16(PointVersion);
output.PutUInt16(ArtVersion);
output.PutUInt64(this.Timestamp);
output.Put(NumberOfAttempts);
output.Put(LastExitCode);
output.Put(LastFailureType);
output.Put(FailureCount);
output.Put(IsRunning);
output.Put(IsReLogging);
}
public override void Deserialize(IoBuffer input, ISerializationContext context)
{
this.MajorVersion = input.GetUInt16();
this.MinorVersion = input.GetUInt16();
this.PointVersion = input.GetUInt16();
this.ArtVersion = input.GetUInt16();
this.Timestamp = input.GetUInt64();
this.NumberOfAttempts = input.Get();
this.LastExitCode = input.Get();
this.LastFailureType = input.Get();
this.FailureCount = input.Get();
this.IsRunning = input.Get();
this.IsReLogging = input.Get();
}
}
}