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