示例#1
0
        public static void RunServerInTheSameThread(Action<int> Control)
        {
            var nsData = new NetworkServerData();
            nsData.Port = Loader.DefaultPort;

            new Action(() =>
            {
                nsData.WaitForServer();
                Control(nsData.Port);
            }).BeginInvoke(null, null);

            var loader = GetLoader();
            loader.CreateSoloNetworkWithData(nsData);
            RunWorld(nsData.World);
        }
 /// <summary>
 /// The entry point for a client that performs a test
 /// </summary>
 /// <param name="test"></param>
 /// <param name="asserter"></param>
 /// <param name="holder"></param>
 void SelfTestClientThread(ICvarcTest test, IAsserter asserter, NetworkServerData holder)
 {
     holder.WaitForServer();
     test.Run(holder, asserter);
 }