1.替换了KCP为C#版本 2.KCP增加了Memery<T>支持。 3.框架增加了对Memery<T>的支持,服务器网络消息采用Memery<T>,性能得大幅度的提升 4.优化了消息调度执行逻辑

1.替换了KCP为C#版本
2.KCP增加了Memery<T>支持。
3.框架增加了对Memery<T>的支持,服务器网络消息采用Memery<T>,性能得大幅度的提升
4.优化了消息调度执行逻辑
This commit is contained in:
ALEXTANG
2023-07-23 00:25:47 +08:00
parent c96d20a89a
commit 35d2012546
67 changed files with 2447 additions and 1025 deletions

View File

@@ -33,7 +33,9 @@ namespace TEngine.Core
{
var configFile = GetConfigPath(dataConfig);
var bytes = File.ReadAllBytes(configFile);
var data = (AProto) ProtoBufHelper.FromBytes(typeof(T), bytes, 0, bytes.Length);
// var data = (AProto) ProtoBufHelper.FromBytes(typeof(T), bytes, 0, bytes.Length);
// var data = ProtoBufHelper.FromBytes<T>(bytes, 0, bytes.Length);
var data = (T)ProtoBufHelper.FromBytes(typeof(T), bytes, 0, bytes.Length);
data.AfterDeserialization();
ConfigDic[dataConfig] = data;
return (T)data;
@@ -65,7 +67,7 @@ namespace TEngine.Core
{
var configFile = GetConfigPath(type.Name);
var bytes = File.ReadAllBytes(configFile);
var data = (AProto) ProtoBufHelper.FromBytes(type, bytes, 0, bytes.Length);
var data = (AProto)ProtoBufHelper.FromBytes(type, bytes, 0, bytes.Length);
data.AfterDeserialization();
ConfigDic[dataConfig] = data;
return data;