static void Test(GameServer gServer) { System.Threading.Thread.Sleep(5000); try { Console.WriteLine("ein langer penis.........:"+gServer.Player[0].PlayerSocket.RemoteEndPoint); } catch (Exception ex) { Console.WriteLine("haha"); } System.Threading.Thread.Sleep(5000); }
static void Main(string[] args) { GameServer server = new GameServer(); CommandLine CmdLine = new CommandLine(); server.Init(); Thread CmdParser = new Thread(new ThreadStart(CmdLine.Run)); Thread Acceptor = new Thread(new ThreadStart(server.Acceptor)); Thread GameServer = new Thread(new ThreadStart(server.Run)); CmdParser.Start(); Acceptor.Start(); GameServer.Start(); }
static void Main(string[] args) { PluginManager pManager = new PluginManager(Environment.CurrentDirectory + "/plugins/"); CommandLine CmdLine = new CommandLine(pManager); GameServer server = new GameServer(pManager); server.Init(); Thread CmdParser = new Thread(new ThreadStart(CmdLine.Run)); Thread Acceptor = new Thread(new ThreadStart(server.Acceptor)); //Thread Test1 = new Thread(new ThreadStart( delegate { Test(server); } )); CmdParser.Start(); Acceptor.Start(); //Test1.Start(); }