mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
[+] 接入ET8服务端
[+] 接入ET8服务端
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using System.Collections;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace ET.Server
|
||||
{
|
||||
[EntitySystemOf(typeof(WatcherComponent))]
|
||||
[FriendOf(typeof(WatcherComponent))]
|
||||
public static partial class WatcherComponentSystem
|
||||
{
|
||||
[EntitySystem]
|
||||
public static void Awake(this WatcherComponent self)
|
||||
{
|
||||
string[] localIP = NetworkHelper.GetAddressIPs();
|
||||
var processConfigs = StartProcessConfigCategory.Instance.GetAll();
|
||||
foreach (StartProcessConfig startProcessConfig in processConfigs.Values)
|
||||
{
|
||||
if (!WatcherHelper.IsThisMachine(startProcessConfig.InnerIP, localIP))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
System.Diagnostics.Process process = WatcherHelper.StartProcess(startProcessConfig.Id);
|
||||
self.Processes.Add(startProcessConfig.Id, process);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user