static void Main(string[] args) { Console.WriteLine("启动服务器中"); DataMgr dataMgr = new DataMgr(); Scene scene = new Scene(); Serv serv = new Serv(); if (dataMgr.Connect()) { serv.proto = new ProtocolBytes(); serv.Start("127.0.0.1", 1234); } while (true) { string str = Console.ReadLine(); switch (str) { case "quit": return; case "print": serv.Print(); break; } } }
public Serv() { instance = this; }