Files
TEngine/Assets/GameScripts/DotNet/Model/Server/Module/Router/RouterComponent.cs
ALEXTANG 336d4b2eb9 [+] 接入ET8服务端
[+] 接入ET8服务端
2023-07-13 12:23:48 +08:00

25 lines
778 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;
using System.Collections.Generic;
using System.Net;
using System.Net.Sockets;
namespace ET.Server
{
[ComponentOf(typeof(Scene))]
public class RouterComponent: Entity, IAwake<IPEndPoint, string>, IDestroy, IUpdate
{
public Socket OuterSocket;
public Socket InnerSocket;
public EndPoint IPEndPoint = new IPEndPoint(IPAddress.Any, 0);
public byte[] Cache = new byte[1500];
public Dictionary<uint, RouterNode> ConnectIdNodes = new Dictionary<uint, RouterNode>();
// 已经连接成功的虽然跟id一样但是没有经过验证的不会加到这里
public Dictionary<uint, RouterNode> OuterNodes = new Dictionary<uint, RouterNode>();
public long LastCheckTime = 0;
}
}