public static void StartServer() { if (FightServer.Instance?.IsRunning >= 0) { return; } FightServer.m_instance = new FightServer(new FightServerConfig()); if (Instance.Start() == false) { Instance.IsRunning = -1; } }
public static void CreateInstance(FightServerConfig config) { if (FightServer.m_instance != null) { return; } FileInfo fileInfo = new FileInfo(config.LogConfigFile); if (!fileInfo.Exists) { ResourceUtil.ExtractResource(fileInfo.Name, fileInfo.FullName, Assembly.GetAssembly(typeof(FightServer))); } XmlConfigurator.ConfigureAndWatch(fileInfo); FightServer.m_instance = new FightServer(config); }
public static void CreateInstance(FightServerConfig config) { //Only one intance if (m_instance != null) return; FileInfo logConfig = new FileInfo(config.LogConfigFile); if (!logConfig.Exists) { ResourceUtil.ExtractResource(logConfig.Name, logConfig.FullName, Assembly.GetAssembly(typeof(FightServer))); } //Configure and watch the config file XmlConfigurator.ConfigureAndWatch(logConfig); //Create the instance m_instance = new FightServer(config); }
public static void CreateInstance(FightServerConfig config) { //Only one intance if (m_instance != null) { return; } FileInfo logConfig = new FileInfo(config.LogConfigFile); if (!logConfig.Exists) { ResourceUtil.ExtractResource(logConfig.Name, logConfig.FullName, Assembly.GetAssembly(typeof(FightServer))); } //Configure and watch the config file XmlConfigurator.ConfigureAndWatch(logConfig); //Create the instance m_instance = new FightServer(config); }
/// <summary> /// 构造函数 /// </summary> public ServerClient(FightServer svr) : base(new byte[2048], new byte[2048]) { m_svr = svr; }
public ServerClient(FightServer svr) : base(new byte[8192], new byte[8192]) { this.m_svr = svr; }
public ServerClient(FightServer svr) : base(new byte[20480], new byte[20480]) { this.m_svr = svr; base.Strict = false; }