TH1/Unity/Assets/Scripts/Hotfix/Server/Benchmark/NetComponentOnReadInvoker_BenchmarkServer.cs
2025-07-17 18:26:28 +08:00

27 lines
899 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
namespace ET.Server
{
[Invoke((long)SceneType.BenchmarkServer)]
public class NetComponentOnReadInvoker_BenchmarkServer: AInvokeHandler<NetComponentOnRead>
{
public override void Handle(NetComponentOnRead args)
{
Session session = args.Session;
object message = args.Message;
// 根据消息接口判断是不是Actor消息不同的接口做不同的处理,比如需要转发给Chat Scene可以做一个IChatMessage接口
switch (message)
{
case ISessionMessage:
{
MessageSessionDispatcher.Instance.Handle(session, message);
break;
}
default:
{
throw new Exception($"not found handler: {message}");
}
}
}
}
}