Esempio n. 1
0
        public virtual C2S.Message.ReqLeave ReqLeave(string message)
        {
            Message.ReqLeave data = JsonConvert.DeserializeObject <Message.ReqLeave>(message);
            if (OnReqLeave != null)
            {
                OnReqLeave(message, data);
            }

            return(data);
        }
Esempio n. 2
0
 public bool ReqLeave(UdpClient client, String uid, String group)
 {
     if (client == null) return false;
     Message.ReqLeave msg = new Message.ReqLeave();
     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;
 }
Esempio n. 3
0
        public bool ReqLeave(UdpClient client, String uid, String group)
        {
            if (client == null)
            {
                return(false);
            }
            Message.ReqLeave msg = new Message.ReqLeave();
            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);
        }