HaoYueTunnel/ClientCore/App.cs

45 lines
1.4 KiB
C#
Raw Normal View History

2023-05-23 17:57:24 +08:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
2023-05-25 18:30:22 +08:00
using ClientCore.Manager;
using ClientCore.Network;
2023-05-23 17:57:24 +08:00
namespace ClientCore
{
2023-05-25 13:24:51 +08:00
public class App
2023-05-23 17:57:24 +08:00
{
public static string TokenStr;
public static long RID = -1;
public static string IP;
public static int Port;
2023-05-25 18:30:22 +08:00
public static LogManager log;
2023-06-15 15:45:58 +08:00
public static ClientManager clientMgr;
public static P2PTcp p2ptcp;
2023-06-15 16:48:37 +08:00
public static P2PChat p2pChat;
2023-06-15 15:45:58 +08:00
public static NetworkHelper networkMain;
public static NetworkHelper networkTcp2S;
2023-05-24 18:31:11 +08:00
public static AppLogin login;
2023-05-25 13:24:51 +08:00
public static AppChat chat;
2023-05-25 18:30:22 +08:00
public static UserMgr userMgr;
2023-05-25 13:24:51 +08:00
2023-06-15 15:45:58 +08:00
public static void Init(string IP, int port, int tcptunnelport)
2023-05-25 13:24:51 +08:00
{
2023-05-25 18:30:22 +08:00
log = new LogManager();
2023-05-25 13:24:51 +08:00
login = new AppLogin();
chat = new AppChat();
2023-05-25 18:30:22 +08:00
userMgr = new UserMgr();
2023-06-15 15:45:58 +08:00
clientMgr = new ClientManager();
clientMgr.SetIpData(IP, port, tcptunnelport);
p2ptcp = new P2PTcp();
2023-06-15 16:48:37 +08:00
p2pChat = new P2PChat();
2023-06-15 15:45:58 +08:00
networkMain = new NetworkHelper(Enum.ServerType.MainServer);
networkMain.Init(IP, port);
//networkTcp2S = new NetworkHelper(Enum.ServerType.TcpTunnelServer);
//networkTcp2S.Init(IP, tcptunnelport);
2023-05-25 13:24:51 +08:00
}
2023-05-23 17:57:24 +08:00
}
2023-05-25 13:24:51 +08:00
}