/// <summary> /// Starts this instance. /// </summary> public void Start() { Log.Info("Starting RaNET as user " + Environment.UserName); _server = new MiNetServer(); //_server.LevelManager = new SpreadLevelManager(Environment.ProcessorCount * 4); _server.StartServer(); }
/// <summary> /// The programs entry point. /// </summary> /// <param name="args">The arguments.</param> private static void Main(string[] args) { XmlConfigurator.Configure(); NodeNetworkHandler.FastThreadPool = new DedicatedThreadPool(new DedicatedThreadPoolSettings(Environment.ProcessorCount)); var server = new MiNetServer(); int threads; int iothreads; ThreadPool.GetMinThreads(out threads, out iothreads); ThreadPool.SetMinThreads(4000, iothreads); var localServerManager = new NodeServerManager(server, 51234); server.ServerManager = localServerManager; server.ServerRole = ServerRole.Node; server.LevelManager = new SpreadLevelManager(60); server.StartServer(); Console.WriteLine("MiNET running..."); Console.ReadLine(); }
static void Main(string[] args) { var logRepository = LogManager.GetRepository(Assembly.GetEntryAssembly()); XmlConfigurator.Configure(logRepository, new FileInfo(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "log4net.xml"))); Log.Info(MiNetServer.MiNET); System.Console.WriteLine(MiNetServer.MiNET); var currentProcess = Process.GetCurrentProcess(); currentProcess.ProcessorAffinity = (IntPtr)Config.GetProperty("ProcessorAffinity", (int)currentProcess.ProcessorAffinity); var service = new MiNetServer(); Log.Info("Starting..."); if (Config.GetProperty("UserBedrockGenerator", false)) { service.LevelManager = new LevelManager(); service.LevelManager.Generator = new BedrockGenerator(); } service.StartServer(); System.Console.WriteLine("MiNET running. Press <enter> to stop service."); System.Console.ReadLine(); service.StopServer(); }
/// <summary> /// Starts this instance. /// </summary> private void Start() { Log.Info("Starting MiNET"); _server = new MiNetServer(); //_server.LevelManager = new SpreadLevelManager(Environment.ProcessorCount * 4); _server.StartServer(); }
/// <summary> /// Starts this instance. /// </summary> private void Start() { var assembly = Assembly.GetExecutingAssembly().GetName().CodeBase; //string rawPath = Path.GetDirectoryName(assembly); Log.Info(assembly); Log.Info("Starting MiNET as user " + Environment.UserName); _server = new MiNetServer(); //_server.LevelManager = new SpreadLevelManager(Environment.ProcessorCount * 4); _server.StartServer(); }
public static void Main(string[] args) { Console.WriteLine("Starting MiNET Server..."); MiNetServer server = new MiNetServer(); server.StartServer(); Console.WriteLine("MiNET Server started! Press <Enter> to exit"); Console.ReadLine(); Console.WriteLine("Stopping MiNET Server..."); server.StopServer(); }
static void Main(string[] args) { if (args.Length > 0 && args[0] == "listener") { // This is a brutal hack to block BDS to use the ports we are using. So we start this, and basically block BDS // while it is starting. Then we close down this process again, and continue on our way. var reset = new ManualResetEvent(false); using var socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp) { ExclusiveAddressUse = true }; socket.Bind(new IPEndPoint(IPAddress.Any, 19132)); System.Console.WriteLine("LISTENING!"); reset.WaitOne(); System.Console.WriteLine("EXIT!"); return; } var logRepository = LogManager.GetRepository(Assembly.GetEntryAssembly()); XmlConfigurator.Configure(logRepository, new FileInfo(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "log4net.xml"))); Log.Info(MiNetServer.MiNET); System.Console.WriteLine(MiNetServer.MiNET); var currentProcess = Process.GetCurrentProcess(); currentProcess.ProcessorAffinity = (IntPtr)Config.GetProperty("ProcessorAffinity", (int)currentProcess.ProcessorAffinity); var service = new MiNetServer(); Log.Info("Starting..."); if (Config.GetProperty("UserBedrockGenerator", false)) { service.LevelManager = new LevelManager(); service.LevelManager.Generator = new BedrockGenerator(); } service.StartServer(); System.Console.WriteLine("MiNET running. Press <enter> to stop service."); System.Console.ReadLine(); service.StopServer(); }
static void Main(string[] args) { var logRepository = LogManager.GetRepository(Assembly.GetEntryAssembly()); XmlConfigurator.Configure(logRepository, new FileInfo("log4net.xml")); System.Console.WriteLine(MiNetServer.MiNET); Log.Info(MiNetServer.MiNET); var service = new MiNetServer(); Log.Info("Starting..."); service.StartServer(); System.Console.WriteLine("MiNET running. Press <enter> to stop service."); System.Console.ReadLine(); service.StopServer(); }
static void Main(string[] args) { var logRepository = LogManager.GetRepository(Assembly.GetEntryAssembly()); XmlConfigurator.Configure(logRepository, new FileInfo("log4net.xml")); int threads; int portThreads; ThreadPool.GetMinThreads(out threads, out portThreads); Log.Info($"Threads: {threads}, Port Threads: {portThreads}"); var service = new MiNetServer(); Log.Info("Starting MiNET"); service.StartServer(); System.Console.WriteLine("MiNET running. Press <enter> to stop service."); System.Console.ReadLine(); service.StopServer(); }
public void StartServer() { _server.StartServer(); }
/// <summary> /// Starts this instance. /// </summary> private void Start() { Log.Info("Starting MiNET"); _server = new MiNetServer(); _server.StartServer(); }