Ejemplo n.º 1
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);
            }
        }
Ejemplo n.º 2
0
        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);
            }
        }
Ejemplo n.º 3
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();
 }