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