コード例 #1
0
ファイル: ActorServer.cs プロジェクト: lulzzz/ARnActorModel
        private void DoInit(HostRelayActor hostRelayActor)
        {
            DirectoryActor.GetDirectory(); // Start directory
            ActorConsole.Register();       // Start console
            // should work now
            SendByName <string> .Send("Actor Server Start", "Console");

            Become(new NullBehavior());
            if (hostRelayActor != null)
            {
                ListenerService = fConfigManager.GetListenerService();
                new ShardDirectoryActor(this); // start shard directory
                fActHostRelay = hostRelayActor;
                fActHostRelay.SendMessage("Listen");
            }
            // new actTcpServer();
        }
コード例 #2
0
        private void DoInit(HostRelayActor hostRelayActor)
        {
            DirectoryActor.GetDirectory(); // Start directory
            ActorConsole.Register();       // Start console
            // should work now
            SendByName.Send("Actor Server Start", "Console");
            if (ServerCommandService == null)
            {
                ServerCommandService = new ServerCommandService();
                ServerCommandService.RegisterCommand(new DiscoServerCommand());
                ServerCommandService.RegisterCommand(new StatServerCommand());
            }
            Become(ServerCommandService);
            if (hostRelayActor == null)
            {
                return;
            }

            ListenerService = _configManager.GetListenerService();
            ShardDirectoryActor.AttachShardDirectoryActor(this);
            _actHostRelay = hostRelayActor;
            _actHostRelay.SendMessage(HostRelayActor.ListenOrder);
        }