Support SRTools web

This commit is contained in:
Naruse
2025-04-17 20:13:39 +08:00
parent 2d6462c321
commit 6208880642
12 changed files with 341 additions and 27 deletions

View File

@@ -1,4 +1,6 @@
import asyncio
from threading import Thread
from game_server.srtools.server import run_flask
from game_server.net.gateway import KCPGateway
from utils.config import Config
from game_server.resource import ResourceManager
@@ -6,7 +8,7 @@ from game_server.resource import ResourceManager
def fn_main():
try:
ResourceManager.instance().load_resources()
asyncio.run(KCPGateway.new(Config.GameServer.IP,Config.GameServer.Port))
Thread(target=run_flask, args=(Config.SRToolsServer.IP, Config.SRToolsServer.Port), daemon=True).start()
asyncio.run(KCPGateway.new(Config.GameServer.IP, Config.GameServer.Port))
except Exception as e:
print(f"Error: {e}")
print(f"Error: {e}")