public void Initialize() { server = new Server(Config.defaults); server.Start(); server.Wait(); Console.WriteLine("Initialize"); }
static void Main(string[] args) { var config = Config.defaults; config.sessionType = typeof(MySession); var server = new Server(config); server.AttachService<ChatService>(); server.Start(); while (true) { Console.WriteLine("running..."); Thread.Sleep(1000); } }
static void Main(string[] args) { NLog.Config.SimpleConfigurator.ConfigureForConsoleLogging(NLog.LogLevel.Debug); var config = Config.defaults; config.port = 9915; config.sessionType = typeof(MySession); config.marshalerType = typeof(JsonMarshaler); var server = new Server(config); server.AttachService<TestService>(); server.Start(); while (true) { //Console.WriteLine("running"); Thread.Sleep(1000); } }
static void Main(string[] args) { var config = Config.defaults; config.marshalerType = typeof(HttpMarshaler); Server server = new Server(config); server.AttachService<FooService>(new FooService()); server.Start(); }