Example #1
0
        ///////////////////////////////////////////////////////

        private bool ReleaseActor(NFIActor xActor)
        {
            if (null == xActor)
            {
                return(false);
            }

            NFIActorMessage xMessage = new NFIActorMessage();

            xMessage.bAsync = false;//同步消息

            xMessage.eType = NFIActorMessage.EACTOR_MESSAGE_ID.EACTOR_BEFORE_SHUT;
            xActor.PushMessages(null, xMessage);

            xMessage.eType = NFIActorMessage.EACTOR_MESSAGE_ID.EACTOR_SHUT;
            xActor.PushMessages(null, xMessage);

            return(true);
        }
Example #2
0
        public override bool SendMsg(NFIDENTID address, NFIDENTID from, NFIActorMessage xMessage)
        {
            if (null == address || null == xMessage)
            {
                return(false);;
            }

            NFIActor xActor = GetActor(address);

            if (null != xActor)
            {
                return(xActor.PushMessages(from, xMessage));
            }

            return(false);
        }