Beispiel #1
0
        public void Initialize()
        {
            _logger.Info("Starting...");

            _map = new World.Chunk();
            _map.GenerateRandom();
            _connections = new Dictionary <long, Networking.ServerConnection>();

            NetPeerConfiguration config = new NetPeerConfiguration(Properties.Resources.Title);

            config.Port              = 12345;
            config.EnableUPnP        = true;
            config.ConnectionTimeout = 10;

            _server = new NetServer(config);
            _server.Start();

            _thread = new Thread(ServerThread);
            _thread.Start();

            _logger.Info("Started.");
        }