mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-07-07 07:00:33 -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
41
server/FSO.Server.Protocol/Aries/AriesPackets.cs
Executable file
41
server/FSO.Server.Protocol/Aries/AriesPackets.cs
Executable file
|
@ -0,0 +1,41 @@
|
|||
using FSO.Server.Protocol.Aries.Packets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace FSO.Server.Protocol.Aries
|
||||
{
|
||||
public class AriesPackets
|
||||
{
|
||||
public static Dictionary<uint, Type> ARIES_PACKET_BY_TYPEID;
|
||||
public static Type[] ARIES_PACKETS = new Type[] {
|
||||
typeof(RequestClientSession),
|
||||
typeof(RequestClientSessionResponse),
|
||||
typeof(RequestChallenge),
|
||||
typeof(RequestChallengeResponse),
|
||||
typeof(AnswerChallenge),
|
||||
typeof(AnswerAccepted)
|
||||
};
|
||||
|
||||
static AriesPackets()
|
||||
{
|
||||
ARIES_PACKET_BY_TYPEID = new Dictionary<uint, Type>();
|
||||
foreach (Type packetType in ARIES_PACKETS)
|
||||
{
|
||||
IAriesPacket packet = (IAriesPacket)Activator.CreateInstance(packetType);
|
||||
ARIES_PACKET_BY_TYPEID.Add(packet.GetPacketType().GetPacketCode(), packetType);
|
||||
}
|
||||
}
|
||||
|
||||
public static Type GetByPacketCode(uint code)
|
||||
{
|
||||
if (ARIES_PACKET_BY_TYPEID.ContainsKey(code))
|
||||
{
|
||||
return ARIES_PACKET_BY_TYPEID[code];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue