예제 #1
0
        static void Main(string[] args)
        {
            var server = new ServerCreater().CreatetRPC(805);

            server.CheckSign();
            server.SetSessionManage(new SessionManage());
            //server.Register<ITestService, TestService>();
            server.RegisterAll(typeof(TestService));
            server.Start();
            Console.ReadLine();
        }
예제 #2
0
파일: Program.cs 프로젝트: zyj0021/CRL5
        static void Main(string[] args)
        {
            var server = new ServerCreater().CreatetApi();

            server.CheckSign();
            server.SetSessionManage(new SessionManage());
            //server.Register<ITestService, TestService>();
            server.RegisterAll(typeof(TestService));
            var listener = new ServerListener();

            listener.Start("http://localhost:809/");
            Console.ReadLine();
        }
예제 #3
0
        static void Main(string[] args)
        {
            var server = new ServerCreater().CreateApi();

            server.CheckSign();
            server.UseJWTUseAuthorization(tokenCheck);
            server.SetSessionManage(new SessionManage());
            //server.Register<ITestService, TestService>();
            server.RegisterAll(System.Reflection.Assembly.GetAssembly(typeof(TestService)));
            var listener = new ServerListener();

            listener.Start("http://localhost:809/");
label1:
            //PollyTest().Wait();
            Console.ReadLine();
            goto label1;
        }
예제 #4
0
        static void Main(string[] args)
        {
            var server = new ServerCreater().CreateWebSocket(8015);

            server.CheckSign();
            server.SetSessionManage(new SessionManage());
            //server.Register<ITestService, TestService>();
            server.RegisterAll(System.Reflection.Assembly.GetAssembly(typeof(TestService)));
            server.Start();
            new CRL.Core.ThreadWork().Start("send", () =>
            {
                var socket = server.GetServer() as CRL.WebSocket.WebSocketServer;
                socket.SendMessage("hubro", new socketMsg()
                {
                    name = DateTime.Now.ToString()
                }, out string error);
                Console.WriteLine("send msg");
                return(true);
            }, 10);
            Console.ReadLine();
        }