Beispiel #1
0
        static void Main(string[] args)
        {
            Console.Title = "FastServer";

            // fastServer服务
            var fastServer = new FastServer();

            fastServer.StartListen(4502);
            Console.WriteLine("FastServer服务启动:" + fastServer.LocalEndPoint);


            // 生成fastServer的代理代码
            var demoPath = Environment.CurrentDirectory;

            while (demoPath.Contains("Server"))
            {
                demoPath = Path.GetDirectoryName(demoPath);
            }
            fastServer.ToProxyCode().WriteToFile(Path.Combine(demoPath, "ClientApp\\FastServerProxyBase.cs"));


            while (true)
            {
                Console.ReadLine();
            }
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            var fastServer = new FastServer();
            
            fastServer.GlobalFilter.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();
            }
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            var fastServer = new FastServer();

            fastServer.GlobalFilter.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();
            }
        }