Exemple #1
0
        public void Initialize()
        {
            server = new Server(Config.defaults);

            server.Start();
            server.Wait();

            Console.WriteLine("Initialize");
        }
Exemple #2
0
        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);
            }
        }
Exemple #4
0
 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();
 }