Example #1
0
        public virtual S2C.Message.ResLogout ResLogout(string message)
        {
            Message.ResLogout data = JsonConvert.DeserializeObject <Message.ResLogout>(message);
            if (OnResLogout != null)
            {
                OnResLogout(message, data);
            }

            return(data);
        }
Example #2
0
        public bool ResLogout(UdpClient client, String uid, bool is_ok, String error_msg)
        {
            if (client == null)
            {
                return(false);
            }
            Message.ResLogout msg = new Message.ResLogout();
            msg.id        = "101";
            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);
        }
Example #3
0
 public bool ResLogout(UdpClient client, String uid, bool is_ok, String error_msg)
 {
     if (client == null) return false;
     Message.ResLogout msg = new Message.ResLogout();
     msg.id = "101";
     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;
 }