static void Main(string[] args) { var fastServer = new FastServer(); fastServer.GlobalFilters.Add(new ExceptionFilterAttribute()); fastServer.BindService(fastServer.GetType().Assembly); fastServer.RegisterResolver(); fastServer.StartListen(1380); Console.Title = "FastServer V" + new SystemService().GetVersion(); Console.WriteLine("服务已启动,端口:" + fastServer.LocalEndPoint.Port); while (true) { Console.ReadLine(); } }
static void Main(string[] args) { var fastServer = new FastServer(); fastServer.GlobalFilters.Add(new ExceptionFilterAttribute()); fastServer.BindService(fastServer.GetType().Assembly); fastServer.RegisterResolver(); fastServer.StartListen(1380); Console.Title = "FastServer V" + new SystemService().GetVersion(); Console.WriteLine("服务已启动,端口:" + fastServer.LocalEndPoint.Port); while (true) { Console.ReadLine(); } }