| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- using System.Net;
- using Model;
- namespace Hotfix
- {
- [ObjectEvent]
- public class NetInnerComponentEvent : ObjectEvent<NetInnerComponent>, IAwake, IAwake<IPEndPoint>, IUpdate
- {
- public void Awake()
- {
- this.Get().Awake();
- }
- public void Awake(IPEndPoint ipEndPoint)
- {
- this.Get().Awake(ipEndPoint);
- }
- public void Update()
- {
- this.Get().Update();
- }
- }
-
- public static class NetInnerComponentSystem
- {
- public static void Awake(this NetInnerComponent self)
- {
- self.Awake(NetworkProtocol.TCP);
- self.MessagePacker = new MongoPacker();
- self.MessageDispatcher = new InnerMessageDispatcher();
- }
- public static void Awake(this NetInnerComponent self, IPEndPoint ipEndPoint)
- {
- self.Awake(NetworkProtocol.TCP, ipEndPoint);
- self.MessagePacker = new MongoPacker();
- self.MessageDispatcher = new InnerMessageDispatcher();
- }
- public static void Update(this NetInnerComponent self)
- {
- self.Update();
- }
- }
- }
|