|
@@ -5,6 +5,7 @@ using System.Linq;
|
|
|
using System.Net.NetworkInformation;
|
|
|
using System.Text;
|
|
|
using System.Threading.Tasks;
|
|
|
+using MemoryPack;
|
|
|
|
|
|
namespace InABox.IPC
|
|
|
{
|
|
@@ -36,7 +37,8 @@ namespace InABox.IPC
|
|
|
}
|
|
|
|
|
|
[Serializable]
|
|
|
- public class IPCMessage
|
|
|
+ [MemoryPackable]
|
|
|
+ public partial class IPCMessage
|
|
|
{
|
|
|
public Guid RequestID;
|
|
|
public Method Method;
|
|
@@ -47,7 +49,13 @@ namespace InABox.IPC
|
|
|
[NonSerialized]
|
|
|
public RequestError ErrorCode;
|
|
|
|
|
|
- private IPCMessage(Guid requestID, Method method, string? type, string data, RequestError error = RequestError.NONE)
|
|
|
+ [MemoryPackConstructor]
|
|
|
+ public IPCMessage()
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ private IPCMessage(Guid requestID, Method method, string? type, string data, RequestError error = RequestError.NONE) : this()
|
|
|
{
|
|
|
RequestID = requestID;
|
|
|
Method = method;
|
|
@@ -56,7 +64,7 @@ namespace InABox.IPC
|
|
|
BinaryData = null;
|
|
|
ErrorCode = error;
|
|
|
}
|
|
|
- private IPCMessage(Guid requestID, Method method, string? type, byte[] data, RequestError error = RequestError.NONE)
|
|
|
+ private IPCMessage(Guid requestID, Method method, string? type, byte[] data, RequestError error = RequestError.NONE) : this()
|
|
|
{
|
|
|
RequestID = requestID;
|
|
|
Method = method;
|