Ejemplo n.º 1
0
        public virtual S2C.Message.NotifyLeave NotifyLeave(string message)
        {
            Message.NotifyLeave data = JsonConvert.DeserializeObject <Message.NotifyLeave>(message);
            if (OnNotifyLeave != null)
            {
                OnNotifyLeave(message, data);
            }

            return(data);
        }
Ejemplo n.º 2
0
 public bool NotifyLeave(UdpClient client, String uid, String group)
 {
     if (client == null) return false;
     Message.NotifyLeave msg = new Message.NotifyLeave();
     msg.id = "105";
     msg.uid = uid;
     msg.group = group;
     string jsonmsg = JsonConvert.SerializeObject(msg);
     byte[] data = UTF8Encoding.UTF8.GetBytes(jsonmsg);
     client.Send(data, data.Length);
     return true;
 }
Ejemplo n.º 3
0
        public bool NotifyLeave(UdpClient client, String uid, String group)
        {
            if (client == null)
            {
                return(false);
            }
            Message.NotifyLeave msg = new Message.NotifyLeave();
            msg.id    = "105";
            msg.uid   = uid;
            msg.group = group;
            string jsonmsg = JsonConvert.SerializeObject(msg);

            byte[] data = UTF8Encoding.UTF8.GetBytes(jsonmsg);
            client.Send(data, data.Length);
            return(true);
        }