Example #1
0
        public override bool SendProcess(ActionParameter parameter)
        {
            string message = parameter.GetValue <string>("message");

            if (string.IsNullOrEmpty(message))
            {
                return(false);
            }

            Packet.Data.WriteValue(message);
            return(true);
        }
        public override bool Process(ActionParameter parameter)
        {
            string        message = "【系统通知】 " + parameter.GetValue <string>("message");
            DynamicBuffer buffer  = new DynamicBuffer();

            buffer.WriteValue(message);
            DataPackage packet = new DataPackage(buffer, 100);

            foreach (var session in SessionClientPool.GetOnlineSession())
            {
                session.Send(packet);
            }
            return(true);
        }