public virtual S2C.Message.ResLeave ResLeave(string message)
        {
            Message.ResLeave data = JsonConvert.DeserializeObject <Message.ResLeave>(message);
            if (OnResLeave != null)
            {
                OnResLeave(message, data);
            }

            return(data);
        }
 public bool ResLeave(UdpClient client, String uid, bool is_ok, String error_msg)
 {
     if (client == null) return false;
     Message.ResLeave msg = new Message.ResLeave();
     msg.id = "104";
     msg.uid = uid;
     msg.is_ok = is_ok;
     msg.error_msg = error_msg;
     string jsonmsg = JsonConvert.SerializeObject(msg);
     byte[] data = UTF8Encoding.UTF8.GetBytes(jsonmsg);
     client.Send(data, data.Length);
     return true;
 }
        public bool ResLeave(UdpClient client, String uid, bool is_ok, String error_msg)
        {
            if (client == null)
            {
                return(false);
            }
            Message.ResLeave msg = new Message.ResLeave();
            msg.id        = "104";
            msg.uid       = uid;
            msg.is_ok     = is_ok;
            msg.error_msg = error_msg;
            string jsonmsg = JsonConvert.SerializeObject(msg);

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