feat(cordis): 接入上下文组合与模组事务热替换
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
#nullable enable
|
||||
|
||||
using System;
|
||||
|
||||
namespace ShrinkNetwork
|
||||
{
|
||||
public static class ShrinkNetworkProtocol
|
||||
{
|
||||
public const int CurrentProtocolVersion = 1;
|
||||
public const int CurrentSchemaVersion = 1;
|
||||
}
|
||||
|
||||
public enum ShrinkNetworkPacketKind
|
||||
{
|
||||
Message = 0,
|
||||
Request = 1,
|
||||
Response = 2
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public sealed class ShrinkNetworkPacket
|
||||
{
|
||||
public int ProtocolVersion = ShrinkNetworkProtocol.CurrentProtocolVersion;
|
||||
public int SchemaVersion = ShrinkNetworkProtocol.CurrentSchemaVersion;
|
||||
public int Opcode;
|
||||
public ShrinkRequestToken RequestToken;
|
||||
public string SessionToken = string.Empty;
|
||||
public long SessionTokenExpiresAtUnixTimeSeconds;
|
||||
public string? Route;
|
||||
public ShrinkNetworkPacketKind Kind;
|
||||
public byte[] Payload = Array.Empty<byte>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user