Exemple #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Starting ServerGame.");

            using (var game = new GameAppServer())
            {
                game.Run();
            }
        }
Exemple #2
0
        public AllServices()
        {
            /*ThreadPool.SetMaxThreads(8, 8);
            *  ThreadPool.SetMinThreads(4, 4);*/
            HostServer = new GameAppServer(new FrontendNetService()
            {
                ResponseHostString    = ">tcp://localhost:5001",
                PublisherSocketString = ">tcp://localhost:5002",
            });
            var b = HostServer.Setup(new ServerConfig()
            {
                Port = 4444,
                MaxConnectionNumber = 10000
            });

            WorkerServer = new BackendNetService[]
            {
                new BackendNetService(new WorkerService(), new ActorConfig
                {
                    ResponseSocketString  = "@tcp://localhost:5001",
                    PublisherSocketString = "@tcp://localhost:5002"
                }),

                /*new ActorNetService(new WorkerService(),new ActorConfig()
                 * {
                 *  PushsocketString = ">tcp://localhost:5001",
                 *  PullSocketString = ">tcp://localhost:5002",
                 * }),
                 * new ActorNetService(new WorkerService(),new ActorConfig()
                 * {
                 *  PushsocketString = ">tcp://localhost:5001",
                 *  PullSocketString = ">tcp://localhost:5002",
                 * }),
                 * new ActorNetService(new WorkerService(),new ActorConfig()
                 * {
                 *  PushsocketString = ">tcp://localhost:5001",
                 *  PullSocketString = ">tcp://localhost:5002",
                 * }),*/
            };
        }