mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-07-06 06:30:27 -04:00
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:
parent
f12ba1502b
commit
22191ce648
591 changed files with 53264 additions and 3362 deletions
36
server/FSO.Server.Protocol/Gluon/AbstractElectronPacket.cs
Executable file
36
server/FSO.Server.Protocol/Gluon/AbstractElectronPacket.cs
Executable file
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using Mina.Core.Buffer;
|
||||
using FSO.Common.Serialization;
|
||||
using FSO.Server.Protocol.Gluon.Packets;
|
||||
|
||||
namespace FSO.Server.Protocol.Gluon
|
||||
{
|
||||
public abstract class AbstractGluonPacket : IGluonPacket
|
||||
{
|
||||
public static IoBuffer Allocate(int size)
|
||||
{
|
||||
IoBuffer buffer = IoBuffer.Allocate(size);
|
||||
buffer.Order = ByteOrder.BigEndian;
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public abstract GluonPacketType GetPacketType();
|
||||
public abstract void Deserialize(IoBuffer input, ISerializationContext context);
|
||||
public abstract void Serialize(IoBuffer output, ISerializationContext context);
|
||||
}
|
||||
|
||||
public abstract class AbstractGluonCallPacket : AbstractGluonPacket, IGluonCall
|
||||
{
|
||||
public Guid CallId { get; set; }
|
||||
|
||||
public override void Serialize(IoBuffer output, ISerializationContext context)
|
||||
{
|
||||
output.PutPascalString(CallId.ToString());
|
||||
}
|
||||
|
||||
public override void Deserialize(IoBuffer input, ISerializationContext context)
|
||||
{
|
||||
CallId = Guid.Parse(input.GetPascalString());
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue