ProtoBase

ProtoBase
This commit is contained in:
ALEXTANG
2023-04-23 14:27:48 +08:00
parent 17c4b9a05f
commit 0dd2716c8e
2 changed files with 70 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
using System;
using ProtoBuf;
using TEngine;
using System.Collections.Generic;
namespace GameProto
{
// 这个文件只放协议,和协议头
// 消息协议
[Serializable,global::ProtoBuf.ProtoContract(Name = @"CSPkg")]
public partial class CSPkg
{
[global::ProtoBuf.ProtoMember(1)]
public CSPkgHead Head { get; set; }
[global::ProtoBuf.ProtoMember(2)]
public CSPkgBody Body { get; set; }
}
// 消息协议头
[Serializable,global::ProtoBuf.ProtoContract(Name = @"CSPkgHead")]
public partial class CSPkgHead
{
[global::ProtoBuf.ProtoMember(1)]
public uint MsgId { get; set; }
[global::ProtoBuf.ProtoMember(2)]
public uint MsgLength { get; set; }
[global::ProtoBuf.ProtoMember(3)]
public uint MsgVersion { get; set; }
[global::ProtoBuf.ProtoMember(4)]
public uint Echo { get; set; }
[global::ProtoBuf.ProtoMember(5)]
public uint SvrTime { get; set; }
}
// 消息协议体
[Serializable,global::ProtoBuf.ProtoContract(Name = @"CSPkgBody")]
public partial class CSPkgBody
{
}
// 协议ID
[global::ProtoBuf.ProtoContract()]
public enum CSMsgID
{
CS_START = 0,
CS_HeartBeat = 10001,
CS_END = 10000,
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6d59eaaad20d9234ba941173b39361fc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: