mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-07-05 22:20: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
61
server/FSO.Server.Protocol/Voltron/Model/RPCRequest.cs
Executable file
61
server/FSO.Server.Protocol/Voltron/Model/RPCRequest.cs
Executable file
|
@ -0,0 +1,61 @@
|
|||
using FSO.Common.Serialization;
|
||||
using Mina.Core.Buffer;
|
||||
using System;
|
||||
|
||||
namespace FSO.Server.Protocol.Voltron.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// DBRequestWrapperPDU
|
||||
/// </summary>
|
||||
public class RPCRequest
|
||||
{
|
||||
public object[] Parameters { get; set; }
|
||||
|
||||
|
||||
public RPCRequest(IoBuffer buffer)
|
||||
{
|
||||
var bodyType = buffer.GetUInt32();
|
||||
|
||||
switch (bodyType)
|
||||
{
|
||||
case 0x125194E5:
|
||||
ParseFormat1(buffer);
|
||||
break;
|
||||
default:
|
||||
throw new Exception("Unknown RPC request type");
|
||||
}
|
||||
}
|
||||
|
||||
private void ParseFormat1(IoBuffer buffer)
|
||||
{
|
||||
var unknown = buffer.GetUInt32();
|
||||
var sendingAvatarId = buffer.GetUInt32();
|
||||
var flags = (byte)buffer.Get();
|
||||
var messageId = buffer.GetUInt32();
|
||||
|
||||
if ((((flags) >> 1) & 0x01) == 0x01)
|
||||
{
|
||||
var unknown2 = buffer.GetUInt32();
|
||||
}
|
||||
|
||||
if ((((flags) >> 2) & 0x01) == 0x01)
|
||||
{
|
||||
var parameter = new byte[4];
|
||||
buffer.Get(parameter, 0, 4);
|
||||
}
|
||||
|
||||
if ((((flags) >> 3) & 0x01) == 0x01)
|
||||
{
|
||||
var unknown3 = buffer.GetUInt32();
|
||||
}
|
||||
|
||||
if ((((flags) >> 5) & 0x01) == 0x01)
|
||||
{
|
||||
var requestResponseID = buffer.GetUInt32();
|
||||
|
||||
/** Variable bytes **/
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue